title: Clear the memory after returning a vector in a function
body: <p>I have a function which processes and stores a lot of data in it and then it returns the results as a vector of class. The amount of data stored in this function is tremendous and I want to clear the storage memory of the function after it finished its job. Is it necessary to do so (does the function automatically clear the memory) or should I clear the memory by some function?</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code>vector&lt;customers&gt; process(char* const *filename, vector&lt;int&gt; ID)
  {
      vector&lt;customers&gt; list_of_customers;
      (perform some actions)
      return list_of_customers;
  }
  </code></pre>