title: std::vector inserts a copy or reference of an object?
body: <p>Lets say I have an object that I dynamically allocated.
  If I push it into a STL vector, will a reference be inserted into the vector or a copy of this object?</p>
  
  <p>It's a general question. For example:</p>
  
  <pre><code>class vec {
  vector&lt;obj&gt; vec;
  void addToVec(obj a) {
      // insert a into vec
   }
    ...
    ...
    ...
   }
  
  obj* a = new obj;
   vec* v = new vec;
   vec.addToVec(a); 
  </code></pre>
  
  <p>If I delete v, will object a die as well?</p>