Go, D, and the GC
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 8 08:58:26 PDT 2015
Am Mon, 05 Oct 2015 13:42:50 +0000
schrieb Adam D. Ruppe <destructionator at gmail.com>:
> On Monday, 5 October 2015 at 07:40:35 UTC, deadalnix wrote:
> > Not on the heap. There are many cases where the destructor
> > won't run and it is allowed by spec. We should do better.
>
> To be fair, if you new a struct in C++ and never delete it, the
> destructor will never run there either. D's in the same boat in
> that regard.
But the D boat reads "Garbage Collector". And besides, D now
runs dtors on new'd structs. The "many cases" may be different
ones than you imagine.
--
Marco
More information about the Digitalmars-d
mailing list