memory releasing in C++(VS2008)
<p>Look at the following C++ code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;queue&gt;

using namespace std;

class Buf
{
public:
    Buf(size_t size)
    {
        _storage.reserve(size);
    }
    ~Buf()
    {
        vector&lt;int&gt; temp;
        _storage.swap( temp );//release memory
    }
    vector&lt;int&gt; _storage;
};

int main()
{
    int i = 0;
    while( ++i &lt; 10000)
    {       
        Buf *buf = new Buf(100000);
        delete buf;
    }

    return 0;
}
</code></pre>

<p>I run it in debug mode(VS2008):when I set a break point in the line</p>

<pre><code>//main function
int i = 0;
</code></pre>

<p>I find that the Process MyProgram.exe occupies about 300KB memory in Windows Task Manager.When I set a break point in the line</p>

<pre><code>return 0;
</code></pre>

<p>The Process MyProgram.exe occupies about 700KB in Windows Task Manager.</p>

<p>My question is :why the memory that the program occupies increased?I think I have release the memory exactly~Why?</p>
