https://issues.dlang.org/show_bug.cgi?id=14650
Jonathan M Davis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #4 from Jonathan M Davis <[email protected]> --- Yeah, I just tested this after a discussion static variables and their liftemos on D.Learn ------------------- import std.stdio; struct S { this(string foo) { _foo = foo; } ~this() { writefln("%s destroyed", _foo); } string _foo; } void main() { static mainStatic = S("main"); auto s = S("local"); f(); } void f() { static fStatic = S("f"); } ------------------- It just prints out local destroyed The variables for the static destructors are never called. --
