|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re^5: out of memory problemby betterworld (Curate) |
| on Sep 13, 2008 at 20:44 UTC ( [id://711166]=note: print w/replies, xml ) | Need Help?? |
|
Suppose I write a module which provides a "frobnicate" function:
Suppose I write a program that runs for a really long time, and uses "frobnicate" only once during its initialization, and it passes a really long string to it. Should I expect that $string will hold this long string for the program's lifetime? Am I supposed to undef every single variable to avoid this? (Which would pretty much nullify this "optimization", but it seems to be the only way to avoid the memory leak.) Update: Replaced the code of the example function.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||