http://www.perlmonks.org?node_id=333467


in reply to Not able to release memory

Perl may be done using that memory for the moment, but virtually all OS's don't reclaim it. However, if you were to rebuild another data-structure that needed gobs of memory, the same memory would be reused within your current process.

Update: I should mention that if you really need to force your OS to reclaim memory, you should start looking at using exec to spawn a new process while terminating the current one. Of course you may need to figure out a solution to maintain state, but that's another discussion.


Dave