-
But the thing is as brewbuck says. The memory goes back to the heap.
So in your program where you need more memory, it will take some of that already freed memory. So the overall memory consumption shouldn't go up.
Also, there is a difference between committed memory and virtual memory. The former is the amount of ram the system has reserved for various things. This is memory actually in use. Virtual memory just means that an application has requested memory but is not necessarily using all of it.