title: How do I verify reference count in ARC mode?
body: <p>I used to verify that some of my variables had the expected retain count using [myVar retainCount] under the debugger, especially for var that did not have a custom dealloc.</p>
  
  <p>How do you do this in ARC mode? How do you ensure that there are no memory leaks?</p>
  
  <p>Note: I understand that ARC should handle this for me, but life is far from being perfect, and in real life you have objects that are sometimes allocated by third party libraries (using retain?) and never deallocated.</p>
  
  <p>Image that I do this:</p>
  
  <pre><code>MyObj *myObj=[[MyObj alloc] init];
  </code></pre>
  
  <p>then I call</p>
  
  <pre><code>[somethingElse doSomethingWithMyObj:myObj];
  </code></pre>
  
  <p>and later, I do</p>
  
  <pre><code>myObj=NULL;
  </code></pre>
  
  <p>If my program is working fine, my expectation is that myObj is being destroyed, but it appears not to be the case...</p>
  
  <p>So how can I track this, especially if somethingElse is not managed by me?</p>
  
  <p>Now, about the tools: it seems extremely hard to run memory tools on my mac (with 5 Meg) without rebooting the mac and starting from scratch. This is really annoying! Instruments keep crashing even before the program has started, so is there an alterante solution?</p>