AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing Picture with GuiControl

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Jan 11, 2006 3:26 am    Post subject: Changing Picture with GuiControl Reply with quote

This might be a real simple thing or something that has been discussed before, but when changing a picture with GuiControl it doesn't release the memory used by the first picture. So if you do this over and over on a program that runs a long time depending on the picture sizes it eats up memory.

Is there a way to unload the pictures in memory that aren't being used any more?

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Jan 11, 2006 3:32 pm    Post subject: Reply with quote

Thanks. I think this bug has been resolved in today's v1.0.40.12.

I think it was caused by my unawareness of this behavior:
MSDN wrote:
With Microsoft Windows XP, if the bitmap passed in the STM_SETIMAGE message contains pixels with non-zero alpha, the static control takes a copy of the bitmap. This copied bitmap is returned by the next STM_SETIMAGE message... if [the application] does not check and release the bitmaps returned from STM_SETIMAGE messages, the bitmaps are leaked.

The fix is written in such a way that it should also correct any similar behavior on other operating systems.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group