C++: Checking for NULL on delete
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3844374/test-for-void-pointer-in-c-before-deleting">Test for void pointer in C++ before deleting</a>  </p>
</blockquote>



<p>Is code snippet 1 equivalent to snippet 2?</p>

<pre><code>//Snippet 1:
    delete record;          
    record = new Record;


//Snippet 2     
    if (record != NULL) 
    {
        delete record;
        record = NULL;
    }       
    record = new Record;
</code></pre>
