Destructor called while object is still alive
Kagamin
spam at here.lot
Mon Oct 26 19:17:59 UTC 2020
On Sunday, 25 October 2020 at 15:50:36 UTC, Steven Schveighoffer
wrote:
> But even if you have synchronous management of files, having a
> destructor clean up a file that obviously isn't used any more
> isn't a bad thing.
Yes, GC environments differentiate between resource management
and defensive cleanup, the latter is done by
destructor/finalizer, the former is done synchronously, they also
run in different environments, so the code is often different too.
More information about the Digitalmars-d
mailing list