Re: Debugging memory corruption? (C++)
Re: Debugging memory corruption? (C++)
- Subject: Re: Debugging memory corruption? (C++)
- From: Dave Carrigan <email@hidden>
- Date: Sun, 1 Nov 2009 10:41:44 -0800
On Nov 1, 2009, at 10:33 AM, Jean-Denis Muys wrote:
Since all std::auto_ptr does is to call delete on its internal
pointer when it goes out of scope (even in case of an exception), I
am still totally puzzled by this behaviour.
It would be interesting to see if you still get the error if you use
the first code without the auto_ptr, but move the delete operation
after the call to zoneCheck() .
This is what is happening with the auto_ptr - its destructor (and
hence the delete) is called at the end of the function, which is after
the call to zoneCheck().
--
Dave Carrigan
email@hidden
Seattle, WA, USA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden