title: Vector of ints on heap and freeing memory
body: <p>I'm creating a vector of ints on the heap like this:</p>
  
  <p><code>std::vector&lt;int&gt; vec = *new std::vector&lt;int&gt;();</code></p>
  
  <p>then I get to the end of my program and I need to free the memory, but using <code>vec.clear()</code> doesn't free the memory.</p>
  
  <p>How do I do this properly?</p>
  
  <p>Thanks and all the best
  -Mitchell</p>