title: Checking if an object has been released before sending a message to it
body: <p>I've only recently noticed a crash in one of my apps when an object tried to message its delegate and the delegate had already been released.</p>
  
  <p>At the moment, just before calling any delegate methods, I run this check:</p>
  
  <pre><code>if (delegate &amp;&amp; [delegate respondsToSelector:...]){
     [delegate ...];
  }
  </code></pre>
  
  <p>But obviously this doesn't account for if the delegate isn't nil, but has been deallocated.</p>
  
  <p>Besides setting the object's delegate to nil in the delegate's <code>dealloc</code> method, is there a way to check if the delegate has already been released just incase I no longer have a reference to the object.</p>