in reply to Memory Leak

Moving the connection out of the subroutine helped (can't believe I missed that one). Thanks. It still leaks a little when the list refreshes, but its much less. I can set it to refresh far less often. Once every 5 minutes would be more than adequate, and that would be a little over 1mb of memory per hour at the rate it's leaking now. Given that this thing probably won't be running more than 10 hours that whould make it livable. I'd still like to know what's causing it though.

Replies are listed 'Best First'.
Re^2: Memory Leak
by BrowserUk (Patriarch) on Jan 06, 2009 at 18:09 UTC

    A half-arsed guess!

    In your loop, you are creating new labels ("name" & "status") each time around, and every time you re-populate. You do not seem to being doing anything to explicitely remove or destroy the previous set of labels. My guess is that these (the previous sets of labels), are hanging around and causing the memory growth.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.