The code below:
module used;
import std.stdio;
class ClassA {
this() { writeln("A ctor"); }
~this() { writeln("A dtor"); }
}
static this() { writeln("used.sctor"); }
static ~this() { writeln("used.sdtor"); }
void main() {
auto a = new ClassA();
}
produces the following output (DMD v2.049):
used.sctor
A ctor
used.sdtor
A dtor
The question is: should the module be allowed to be unloaded before all
module-level objects/structures are destructed/unloaded?
