Hello for all ! I need to call all objects destructors in one place. It's guaranted, that there is no objects instances.
I tried use GC.collect but it's produces strange results.
import std.stdio;
import core.memory;
class A {
~this() { writeln(`dtor`); };
};
void main() {
auto a = new A;
a = null;
GC.collect();
writeln(`after dtor`);
}
Output is:
after dtor
dtor
Why?
Regards.
