Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I believe that someone once told me that the memory dedicated to an array doesn't shrink, even if you assign an empty list to it -- rather Perl just adjusts its pointers for the start and end of the array, but the memory stays allocated. Could that be causing the problem? You might try using a new lexical array or array reference instead of "cleaning" the array and see if that helps. P.S. That's true for hashes as well -- while the memory for the keys and values can be cleared, the memory allocated to the underlying array stays allocated. I think that jdhedden told me that when we were discussing hash-based vs array-based inside-out objects. -xdg Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk. In reply to Re: How to locate a memory leak..
by xdg
|
|