PugSA has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks
I use a module wich calls a CLI for a specific Java software I use. I work on a win32 machine
When I call the module it looks like this
use appiqcli; my @eventlist = appiqlist(-event -all);
I then print the array to a file. After the script has compleded the CLI clears the virtual memory on my machine. But when I put the script in an endless loop, see code below and I break the loop it does not release the memory (I think it is because I break the script while it might still use the Java and does not have the oppotunity to clean the memory). My question is how can I write a while that loops untill I press a keystroke or send the script an instruction to stop. This will still allow the script to close and release the memory
use appiqcli; while(1) { my @eventlist = appiqlist(-event -all); sleep(10); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: break out of enless loop does not release memory
by bart (Canon) on Feb 21, 2007 at 12:23 UTC | |
by Limbic~Region (Chancellor) on Feb 21, 2007 at 14:11 UTC | |
by Anonymous Monk on Feb 21, 2007 at 12:59 UTC | |
by cdarke (Prior) on Feb 21, 2007 at 17:22 UTC | |
|
Re: break out of enless loop does not release memory
by perrin (Chancellor) on Feb 21, 2007 at 12:47 UTC | |
|
Re: break out of enless loop does not release memory
by zentara (Cardinal) on Feb 21, 2007 at 13:59 UTC |