title: Is it possible to delete a non-new object?
body: <p>I have an object with a vector of pointers to other objects in it, something like this:</p>
  
  <pre><code>class Object {
      ...
      vector&lt;Object*&gt; objlist;
      ...
  };
  </code></pre>
  
  <p>Now, Objects will be added to list in both of these ways:</p>
  
  <pre><code>Object obj;
  obj.objlist.push_back(new Object);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Object name;
  Object* anon = &amp;name;
  obj.objlist.push_back(anon);
  </code></pre>
  
  <p>If a make a destructor that is simply</p>
  
  <pre><code>~Object {
      for (int i = 0; i &lt; objlist.size(); i++) {
          delete objlist[i];
          objlist[i] = NULL;
      }
  }
  </code></pre>
  
  <p>Will there be any adverse consequences in terms of when it tries to delete an object that was not created with new?</p>