Structs intended to run destructor immediately if not assigned to a variable?

rsw0x via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 14 21:23:56 PST 2016


Returning a struct with a destructor and not binding it to a 
variable appears to make the destructor run immediately instead 
of at the end of the scope.
Is this intended?

example:
http://dpaste.dzfl.pl/dd285200ba2b


More information about the Digitalmars-d-learn mailing list