I hate class destructors with a burning passion
Guillaume Piolat
first.last at gmail.com
Mon Jun 7 12:17:18 UTC 2021
On Monday, 7 June 2021 at 10:04:32 UTC, Imperatorn wrote:
>
> Do we have an issue or two for that? Sounds like an
> enhancement. Should/would it be configurable? Like
> -gcClassDtors=yes/no/auto kind of a thing or just kill it.
That the GC would not call class destructors have been proposed
by Alexandrescu in this very community, which kindly rejected the
change, years ago.
This can be done if everyone first jump into the deterministic
destruction wagon, since programs are currently accidentally
correct. But you'll find that people do not agree on the problem.
So, in the absence of consensus, idioms like the one I posted are
what we have right now.
More information about the Digitalmars-d
mailing list