GC and outside references to D-code

teo teo.ubuntu at yahoo.com
Fri Jul 6 12:05:19 PDT 2007


Kirk McDonald Wrote:

> teo wrote:
> > Hi *, I'm concerned about the garbage collector moving an instance of an object to another location.
> > 
> > From D Specification (page 171):
> > “... compacting the remaining used memory by copying the allocated objects (called a
> >  copying collector)”
> > 
> 
> Page 171?
> 
> However, the current GC implementation is not a copying collector. If it 
> ever becomes one, you should expect an API for "pinning" allocated 
> memory (so that it won't be moved) to be added.
> 
That's why I thought about addRoot. Anyway thanks Kirk.


More information about the Digitalmars-d-learn mailing list