compile time garbage collection

weaselcat via Digitalmars-d digitalmars-d at puremagic.com
Sun May 3 01:41:03 PDT 2015


On Sunday, 3 May 2015 at 08:34:09 UTC, Ola Fosheim Grøstad wrote:
> On Sunday, 3 May 2015 at 08:22:31 UTC, weaselcat wrote:
>>
>> there's no guarantee GC allocated memory will _ever_ have 
>> their destructor ran, it's part of the spec.
>
> That would be very unfortunate, they have to either be called 
> eventually or never called.  I find no such description in the 
> "spec":
>
> http://dlang.org/garbage.html
>
> «5. Freeing all GC allocated memory that has no active pointers 
> to it and do not need destructors to run.
>
> 6. Queueing all unreachable memory that needs destructors to 
> run.
>
> 7. Resuming all other threads.
>
> 8. Running destructors for all queued memory.»

http://dlang.org/class.html#destructors


More information about the Digitalmars-d mailing list