[D-runtime] Mixing GC and non-GC in D. (AKA, "don't touch GC-references from DTOR, preferably don't use DTOR at all")

Vladimir Panteleev vladimir at thecybershadow.net
Tue Dec 14 14:56:35 PST 2010


On Sun, 12 Dec 2010 20:49:22 +0200, Ulrik Mikaelsson  
<ulrik.mikaelsson at gmail.com> wrote:

> Ideas, opinions? Perhaps this have been discussed before?

I see no obvious flaws for this proposal (except, obviously, relying on  
accessing destroyed objects). Perhaps you should repost this in the  
digitalmars.D newsgroup for higher visibility?

Either way, here's an alternate suggestion: add the objects in unmanaged  
memory to the list of GC roots. If you use a bulk allocator, you can make  
the allocator add the whole pool.

-- 
Best regards,
  Vladimir                            mailto:vladimir at thecybershadow.net



More information about the D-runtime mailing list