title: Is there any reason to check for a NULL pointer before deleting?
body: <p>I often see legacy code checking for <code>NULL</code> before deleting a pointer, similar to,</p>
  
  <pre><code>if (NULL != pSomeObject) 
  {
      delete pSomeObject;
      pSomeObject = NULL;
  }
  </code></pre>
  
  <p>Is there any reason to checking for a <code>NULL</code> pointer before deleting it? What is the reason for setting the pointer to <code>NULL</code> afterwards?</p>