Am Do 13. Jan 2011, 02:26:14, pwnz0r schrieb:
Show quoted text> if running code similar to this
>
> $ps = Sys::Statistics::Linux::Processes->new;
> $ps->init;
>
> while (1) {
> $x = $ps->get();
> sleep (1);
> }
>
> the app will consume all available mem in short time.
> i circumevented it by putting the object creation into the loop and
> calling undef($x) explicitly after sleep.
Sorry, but I cannot believe that. If you are really care that S::S::L
consumes the memory then please try to determine what happends.
If the memory of the program cosumes to much memory then dump the
structrure into a logfile or use a Devel::* module to find the error.
In addition you should sleep between the call of init() and get(). In
your code above exists a sleep within the while() loop, but not beween
init() and the first call of get().