"be consistent" | |
PerlMonks |
Re: Shared array memory leak in Perl5.8by petesmiley (Friar) |
on May 20, 2003 at 15:50 UTC ( [id://259498]=note: print w/replies, xml ) | Need Help?? |
I haven't checked the links provided here yet for lack of time. I have run into this in the past. The error I was having was with pop and shift not releasing the memory on shared arrays.
For a quick fix I changed the dequeue method in Thread::Queue to do a: delete $q->[-1] (which returns the value deleted) instead of a shift. I also changed the enqueue to unshift instead of push to return it the correct behavior of a queue. This seems to work. Not sure if this will help, or what the internal differences between a delete and shift would be to a shared array. Good Luck. smiles Edited: Ah there certainly is a patch, I could of used that few months ago. :(
In Section
Seekers of Perl Wisdom
|
|