• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugging memory corruption? (C++)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Debugging memory corruption? (C++)
      • From: Jean-Denis Muys <email@hidden>
    • Re: Debugging memory corruption? (C++)
      • From: Jean-Denis Muys <email@hidden>
References: 
 >Re: Debugging memory corruption? (C++) (From: Jean-Denis Muys <email@hidden>)

  • Prev by Date: Re: Debugging memory corruption? (C++)
  • Next by Date: Re: Xcode Font sizes
  • Previous by thread: Re: Debugging memory corruption? (C++)
  • Next by thread: Re: Debugging memory corruption? (C++)
  • Index(es):
    • Date
    • Thread