[Issue 2590] Deallocator is not called if constructor fails.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 4 10:07:53 PDT 2010


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



--- Comment #2 from Max Samukha <samukha at voliacable.com> 2010-04-04 10:07:51 PDT ---
He is talking about constructors/destructors, not allocators/deallocators. I
totally agree the destructor must not be called on a partially constructed
object. Conversely, the memory that has been successfully allocated for an
object needs to be properly deallocated even if the constructor fails.

On the other hand, if overloaded new/delete are going to be removed from the
language, the problem will pass away.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list