~= call copy ctor?

Namespace rswhite4 at googlemail.com
Sun Jul 22 09:35:50 PDT 2012


A other question:
How can i check if t is valid, after i call "clear"?

[code]
import std.stdio;

class Test {
public:
	this() {
		writeln("CTor");
	}

	~this() {
		writeln("DTor");
	}
}

void main() {
	Test t = new Test();

	clear(t);

	writeln("end main");
}
[/code]

If i write assert(t !is null); it fails, and if i write
writeln(t); or assert(t); i get an access violation.


More information about the Digitalmars-d-learn mailing list