garbage collection in d

Sean Kelly sean at invisibleduck.org
Thu Apr 8 08:31:39 PDT 2010


Michel Fortin Wrote:

> On 2010-04-08 02:35:12 -0400, Walter Bright <newshound1 at digitalmars.com> said:
> 
> > Sean Kelly wrote:
> >> Yeah, it's the write barriers that are the problem.  I can see such a
> >> collector working in SafeD, but likely not in D proper.
> > 
> > Write barriers trade off improved collection times for worse computation times.
> 
> Essentially, Apple traded the previous reference-counted system in 
> Objective-C which requires memory barriers to update reference counts 
> for a garbage-collected system which also requires memory barriers, but 
> can deallocate objects in a separate thread. It's almost no tradeoff 
> really.

There's no problem with cycles using a scanning GC though.



More information about the Digitalmars-d mailing list