forcing "@nogc" on class destructors

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 29 16:47:59 PST 2015


On Friday, 30 January 2015 at 00:28:18 UTC, Jerry Morrison wrote:
> On Wednesday, 28 January 2015 at 11:32:26 UTC, Ola Fosheim 
> Grøstad wrote:
>> But I think GC and destructors are not a good match... so I 
>> would personally go for performance and no destructors.
>
> Yes. That is the bottom line.
>
> A good match for GC is the phantom reference, which notifies 
> you when an object gets collected with no way to resurrect the 
> collected object or access its instance variables.

That is more important than the nogc thing, as it has real impact 
of definition and implementation.

This is the kind of thing we can solve with proper lifetime 
definition.


More information about the Digitalmars-d mailing list