http://d.puremagic.com/issues/show_bug.cgi?id=7349
Summary: assert(0) in class destructor - bad (or incorrect) error Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: full.de...@gmail.com --- Comment #0 from Taco <full.de...@gmail.com> 2012-01-22 10:38:18 PST --- class C { public: this() { } ~this() { assert (0); } } void main() { C c = new C; } Upon destruction, it throws: core.exception.InvalidMemoryOperationError Which is very vague / incorrectly describes the problem. The documentation also does not mention throwing exceptions is forbidden in destructors (or are they not?). For debugging purposes I do like to assert some stuff in the destructor though... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------