Destructor call

kinke noone at nowhere.com
Tue Apr 10 18:52:19 UTC 2018


On Tuesday, 10 April 2018 at 18:34:54 UTC, n0fun wrote:
> Why the destructor is called in the second case and why not in 
> the first?

The first case is RAII, where destruction isn't done for not 
fully constructed instances.
The second case is GC finalization at program shutdown and looks 
like a bug, as the GC should probably immediately reclaim the 
allocated heap memory if construction wasn't successful.


More information about the Digitalmars-d-learn mailing list