![]() |
|
No such thing as a small change | |
PerlMonks |
How can I free an array or hash so my program shrinks?by faq_monk (Initiate) |
on Oct 08, 1999 at 00:12 UTC ( #538=perlfaq nodetype: print w/replies, xml ) | Need Help?? |
Current Perl documentation can be found at perldoc.perl.org. Here is our local, out-dated (pre-5.6) version: You can't. On most operating systems, memory allocated to a program can never be returned to the system. That's why long-running programs sometimes re-exec themselves. Some operating systems (notably, FreeBSD) allegedly reclaim large chunks of memory that is no longer used, but it doesn't appear to happen with Perl (yet). The Mac appears to be the only platform that will reliably (albeit, slowly) return memory to the OS.
However, judicious use of
|
|