@nogc and NSAutoReleasePool-style regions.

via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 9 07:36:36 PDT 2014


On Wednesday, 9 July 2014 at 12:07:27 UTC, Ola Fosheim Grøstad 
wrote:
> Another benefit with explicit GC pointers is that you could ban 
> GC pointers to classes that provide destructors, sanitizing the 
> constructor/destructor situation.

This could also be done at the allocator level, though. An 
allocator presumably knows whether it's objects are garbage 
collected (hmm... maybe not necessarily?), and it can inspect 
types to find out whether they have destructors.


More information about the Digitalmars-d mailing list