Destructor called while object is still alive
Boris Carvajal
boris2.9 at gmail.com
Fri Oct 23 13:48:52 UTC 2020
On Friday, 23 October 2020 at 13:34:56 UTC, Ola Fosheim Grøstad
wrote:
> On Friday, 23 October 2020 at 13:23:18 UTC, Boris Carvajal
> wrote:
>> exit() is irrelevant, I checked the asm output.
>
> Ok, I guess GC.collect() is called after main() by the runtime
> then.
Just to clarify my point.
I was talking about 'scope foo = Bar.create();' that does
nothing, neither the class is stack allocated nor the pointer is
kept until the end of the function.
I think you are totally right about the optimizer vs D GC.
More information about the Digitalmars-d
mailing list