GC.collect bug ?

Namespace rswhite4 at googlemail.com
Fri Sep 13 09:42:59 PDT 2013


Another use case of delete, which is unfortunately deprecated. ;)
----
import std.stdio;
import core.memory;

class A {
	~this() { writeln(`dtor`); };
};

void main() {
	auto a = new A;
	delete a;
	writeln(`after dtor`);
}
----

Ooutput:
dtor
after dtor


More information about the Digitalmars-d-learn mailing list