Destructor called while object is still alive

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sat Oct 24 06:50:13 UTC 2020


On Friday, 23 October 2020 at 23:33:59 UTC, Johan Engelen wrote:
> We can fix this in LDC (quite easily it looks like. We can 
> force LLVM to put&keep certain pointers on the stack), but I 
> first would like to see consensus about this issue from the 
> language designers and see it in text in the language spec.

Maybe you only need to do it in functions that are marked as not 
returning normally (bottom). It is already implicit in the 
current spec that variables are valid throughout their scope, so 
it is the current behaviour that should be documented as it 
violates static binding principles.



More information about the Digitalmars-d mailing list