Re: Is GC.setAttr(p, GC.BlkAttr.NO_MOVE) guaranteed to work?

2014-07-01 Thread Rainer Schuetze via Digitalmars-d-learn
On 02.07.2014 08:17, Ali Çehreli wrote: There is an example in GC.addRoot() documentation where the programmer is trying to mark a memory block as NO_MOVE: http://dlang.org/phobos/core_memory.html#.GC.addRoot auto context = new Object; GC.addRoot(cast(void*)context); GC.setA

Is GC.setAttr(p, GC.BlkAttr.NO_MOVE) guaranteed to work?

2014-07-01 Thread Ali Çehreli via Digitalmars-d-learn
There is an example in GC.addRoot() documentation where the programmer is trying to mark a memory block as NO_MOVE: http://dlang.org/phobos/core_memory.html#.GC.addRoot auto context = new Object; GC.addRoot(cast(void*)context); GC.setAttr(cast(void*)context, GC.BlkAttr.NO_MOVE);