Re: [pysystray-users] LoadImage memory leak (patch included)
Status: Beta
Brought to you by:
essiene
From: Essien I. E. <es...@sp...> - 2005-12-13 11:52:46
|
Applied patch to your patch :) Thnx Essien Ita Essien ----------------------------- http://essiene.blogspot.com http://datavibe.net/~essiene http://datavibe.net/~essiene/pysystray ---------------------------------------------- ...the future is open. -----Original Message----- From: pys...@li... [mailto:pys...@li...] On Behalf Of Greg Hazel Sent: Monday, December 12, 2005 1:00 AM To: pys...@li... Subject: SPAM-LOW: Re: [pysystray-users] LoadImage memory leak (patch included) For some reason, after a running for a few days, the systray icon has a small chance of going the default white-with-blue-top default icon. My guess is the loaded_icon trick I included in this patch causes that. Reloading the icon every second isn't terribly cpu intensive, so I've taken that part out for now. The diff is attached. -Greg On 12/9/05, Essien Ita Essien <es...@sp...> wrote: > Applied. Thnx. > > Essien Ita Essien > ----------------------------- > http://essiene.blogspot.com > http://datavibe.net/~essiene > http://datavibe.net/~essiene/pysystray > ---------------------------------------------- > ...the future is open. > > -----Original Message----- > From: pys...@li... > [mailto:pys...@li...] On Behalf Of Greg Hazel > Sent: Friday, December 09, 2005 8:30 AM > To: pys...@li... > Subject: SPAM-LOW: [pysystray-users] LoadImage memory leak (patch included) > > This patch addresses a bug I found. > The memory allocated with LoadImage was not being destroyed when a new > icon was created. We change the tooltip text frequently, and after > about 1000 updates (which call refresh_icon) there's so little > resources left that the main gui crashes. > I added some code to only reallocate if it needs to, and to clean up > if it had previously allocated. Also, I changed LR_DEFAULTSIZE to > 16x16, since the wrong image was being pulled (and resized) from our > multi-format icon. That last part is independent of the bugfix, but I > recommend it. > > -Greg > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > pysystray-users mailing list > pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysystray-users > |