title: What happens to the pointer itself after delete?
body: <pre><code>void doSomething()
  {  
      TheObject *ptr = new TheObject;
      delete ptr;
      ptr = NULL;
      return 0;
  }
  </code></pre>
  
  <p>Let me borrow the words from <a href="http://www.cplusplus.com/reference/new/operator%20delete/" rel="noreferrer">operator delete</a> in cplusplus.com:</p>
  
  <blockquote>
    <p>Deallocates the memory block pointed by ptr (if not null), releasing
    the storage space previously allocated to it by a call to operator new
    and rendering that pointer location invalid.</p>
  </blockquote>
  
  <p>Please help to clear my confusions: what happens to the pointer itself after delete? The pointer itself does have an address, right? So after the pointed block is deleted, what about the pointer itself?</p>
  
  <p>Could I say that the pointer itself will be free after returning the method where the pointer is initialized? Is the pointer itself placed on the stack or heap?</p>