in reply to File::Find memory leak
If you can't find and fix the leak you'll probably have to fork() a sub-process to do whatever leaks, pass the results up to the parent via a pipe or temp file and then exit() the child. When the child exits any memory it used will be reclaimed by the operating system. I've used this technique before with leaky Perl modules. Give it a try and post again if you have trouble.
-sam
PS: The above suggestion assumes you're working on a Unix system. I imagine things are different in Windows-land, where fork() is emulated with threads and exit() probably doesn't free memory.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: File::Find memory leak
by crabbdean (Pilgrim) on Jan 27, 2004 at 04:21 UTC |