in reply to Memory Management in Perl
Every time your script starts another series of tests, instead of just diving in to them, start by calling fork(). The child process should perform the tests and exit; the parent process should just call wait() to collect the child process. If the testing process leaks memory, file handles, etc. then they'll be cleaned up when the child process exits.
This isn't the elegant, professional solution, but it will solve the problem without requiring a major rewrite of the script.
|
|---|