Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: How do I free memory allocated to an arrayby Sewi (Friar) |
on Apr 22, 2009 at 12:28 UTC ( [id://759262]=note: print w/replies, xml ) | Need Help?? |
You should look at the two types of "free" memory: 1. Memory returned to the operating system for re-allocation to (other) processes. 2. Memory returned to the internal "free memory" pool of the process. Even if you may not be able to return memory to the operating system, you may be able to re-use it within your process. Try the following sample: You'll see that perl really returns (parts of) the memory used for $X after is has been destroyed. (I didn't expect this, too :-) ).
In Section
Seekers of Perl Wisdom
|
|