in reply to Memory leak!
I didn't look to closely. The indenting in your code looks a bit random (hard to follow the flow). Try perltidy to fix that. But there are a few things that you should take a look at:
First, you call a function like this:
I think you really meantfor (;;) { &Prog; }
while(1) { Prog(); }
The function cleanUp calls opendir but not closedir. Looks like you do the same in Prog. One of the golden rules is: Always close handles as soon as you don't need them anymore.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Memory leak!
by BrowserUk (Patriarch) on Dec 12, 2011 at 19:53 UTC | |
by cavac (Prior) on Dec 12, 2011 at 19:54 UTC | |
by ikegami (Patriarch) on Dec 13, 2011 at 02:52 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2011 at 03:46 UTC | |
by ikegami (Patriarch) on Dec 13, 2011 at 04:44 UTC | |
|
Re^2: Memory leak!
by joeymac (Acolyte) on Dec 12, 2011 at 19:44 UTC | |
by cavac (Prior) on Dec 12, 2011 at 19:48 UTC | |
by roboticus (Chancellor) on Dec 12, 2011 at 20:20 UTC | |
by ikegami (Patriarch) on Dec 13, 2011 at 02:22 UTC | |
by ikegami (Patriarch) on Dec 13, 2011 at 02:19 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2011 at 02:58 UTC | |
by chromatic (Archbishop) on Dec 13, 2011 at 07:13 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2011 at 07:23 UTC | |
by ikegami (Patriarch) on Dec 13, 2011 at 04:17 UTC | |
by BrowserUk (Patriarch) on Dec 13, 2011 at 04:30 UTC | |
|