class destruction
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Sep 9 08:19:02 PDT 2015
On Wednesday, 9 September 2015 at 15:10:33 UTC, Q wrote:
> But since D has a GC and (per default) force to heap allocate a
> class. So IMO the GC should also destroy it, everything else is
> just awkward.
Well, it *does* by default. If that's what you want, just do it
the plain way with simple `new`. It will be destroyed (and any
structs inside also destroyed) when the GC gets it.
More information about the Digitalmars-d-learn
mailing list