The memory is freed, it's just not given back to the OS.
This is so you can allocate and free memory through the life of the program without going to the hassle of asking the OS each time you want some more memory.
If you repeat the allocation, then your system monitor should show no change. If it does keep going up with each new allocation, and you think you are freeing memory, then you may have a leak.
When you finally quit the program, then all will be well.
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Offline 7,164 posts
since Dec 2005