[Issue 704] destructors are called even if the constructor throws an exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 17 04:12:27 PST 2009


http://d.puremagic.com/issues/show_bug.cgi?id=704





------- Comment #5 from samukha at voliacable.com  2009-01-17 06:12 -------
Default initializing object's fields doesn't mean full object construction. I
do believe that an object should be considered constructed only if its
constructor has completed successfully. Otherwise, the constructor should clean
after itself and only deallocator (if any), but not destructor, should be run.
Currently, deallocator is not run, meaning another bug in the compiler.


-- 



More information about the Digitalmars-d-bugs mailing list