title: How to properly destroy c++ vector of vectors and release memory
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7925151/how-to-release-stdvector-if-there-is-no-heap-memory">How to release std::vector if there is no heap memory</a>  </p>
  </blockquote>
  
  
  
  <p>c++ noob here</p>
  
  <p>Suppose I declare a vector of vectors like: </p>
  
  <pre><code>vector&lt;vector&lt;vector&lt;double&gt; &gt; &gt; phi_x;
  </code></pre>
  
  <p><strong>After I'm done using it, how do I destroy it to free up memory?</strong> </p>
  
  <p>I've read some other sites and they recommend using .clear(). From my understanding, this only deletes the elements but the vector capacity is not released. I want the vector to be completely forgotten like it never existed.</p>
  
  <p>Also, my current application of the vector has dimensions of 54x54x9 and I've got about 12 of these things. Is that considered stupidly big?</p>