Enforced @nogc for dtors?
Paulo Pinto via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 5 12:17:11 PDT 2014
Am 05.05.2014 19:46, schrieb Orvid King via Digitalmars-d:
> The current GC cannot allocate within a destructor because of the fact
> that it has to acquire a global lock on the GC before calling the
> actual destructor, meaning that attempting to allocate or do anything
> that requires a global lock on the GC is impossible, because the lock
> has already been acquired by the thread. Admittedly this isn't the way
> it actually fails, but it is the flaw in the design that causes it to
> fail.
>
This is precisely the point. I see this whole discussion as going around
in circles instead of fixing the GC.
Which is fine, assuming that at the end of the day, D gets a sound
automatic memory management model, be it RC/GC/compiler dataflow based,
which doesn't keep be questioned all the time.
Otherwise, I see this as the second coming of Tango vs Phobos.
--
Paulo
More information about the Digitalmars-d
mailing list