Idomatic way to guarantee to run destructor?

Robert M. Münch robert.muench at saphirion.com
Sat May 2 08:39:42 UTC 2020


On 2020-04-30 17:04:43 +0000, Ben Jones said:

> I think you want to use scope rather than auto which will put the class 
> on the stack and call its destructor: 
> https://dlang.org/spec/attribute.html#scope

Yes, thanks.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list