title: Does myVector.erase(myPtr) delete the object pointed by myPtr?
body: <p>If I have the following code,</p>
  
  <pre><code>Foo *f = new Foo();
  vector&lt;Foo*&gt; vect;
  vect.push_back(f);
  // do stuff
  vect.erase(f);
  </code></pre>
  
  <p>Did I create a memory leak? 
  I guess so, but the word <em>erase</em> gives the feeling that it is deleting it. </p>
  
  <p>Writing this, I am wondering if it is not a mistake to put a pointer in a STL vector. What do you think?</p>