Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When an object is "double-freed", the most common cause is that you're (unnecessarily) releasing an autoreleased object, and it is later autoreleased when the containing autorelease pool is emptied.</p> <p>I've found that the best way to track down the extra release is to use the <strong>NSZombieEnabled</strong> environment variable for the affected executable in Xcode. For a quick rundown of how to use it, check out <a href="http://www.cocoadev.com/index.pl?NSZombieEnabled" rel="nofollow noreferrer">this CocoaDev wiki page</a>. (In addition to this page, Apple has documented some incredibly obscure yet useful tips for debugging code in Xcode, some of which have saved my bacon more than a few times. I suggest checking out <a href="http://developer.apple.com/technotes/tn2004/tn2124.html#SECFOUNDATION" rel="nofollow noreferrer">this Technical Note</a> on developer.apple.com — link jumps to the section on Cocoa's Foundation framework).</p> <p><strong>Edit:</strong> You can often track the offending object down within the Xcode debugger, but it's often much easier if you use Instruments to assist you. From Xcode, choose <strong>Run &rarr; Start With Performance Tool &rarr; Object Allocations</strong> and you should be able to trace the offending object back to where it was created. (This will work best if you're enabled zombies as discussed above.) <strong>Note:</strong> Snow Leopard adds a Zombies tool to Instruments, accessible from the Run menu as well. Might be worth the $29 alone! ;-)</p> <p>There is also a <a href="https://stackoverflow.com/questions/535060/how-to-add-nsdebug-h-and-use-nszombie-in-iphone-sdk">related SO question here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload