| View previous topic :: View next topic |
| Author |
Message |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Wed Jan 11, 2006 3:26 am Post subject: Changing Picture with GuiControl |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Jan 11, 2006 3:32 pm Post subject: |
|
|
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 |
|
 |
|