title: Release Mat inside std::vector
body: <p>Using <strong>OpenCV 2.2</strong>, I am trying to free memory be calling release to a Mat image
  inside a std::vector, such as:</p>
  
  <pre><code>std::vector &lt; Mat &gt; matVec;
  </code></pre>
  
  <p>However, it seems like</p>
  
  <pre><code>for (int k = 0; k &lt; matVec.size(); k++)
  {
  
     matVec[k].release();
  
  }
  </code></pre>
  
  <p>is not releasing any memory (it still compiles, though).</p>
  
  <p>I know there is new memory management in <strong>OpenCV 2.2</strong>, but I couldn't spot the
  issue.</p>
  
  <p>A similar example with <code>IplImage*</code> type instead of Mat (using <code>cvReleaseImage()</code> instead of the Mat member function <code>.release()</code>) works just fine.</p>
  
  <p>Any hints?</p>