On Sun, Apr 26, 2009 at 8:22 AM, lostgallifreyan
<lostgallifre...@gmail.com> wrote:
>> On Sat, Apr 25, 2009 at 1:11 PM, lostgallifreyan
>> <lostgallifre...@...> wrote:
>
> One thing I've noticed is that when loading a large bitmap, I get one or
> two shots at it providing each load and close of the program is clean.
> If I try too soon the bitmap loads but is not displayed! Conversely if I
> leave the program sitting for a while, I can expect to close and reload
> and have it display more that twice per session without reboot. If it borks
> and fails to display, that's it, end of session, need reboot. (This is W98
> SE). I have tried collectgarbage("collect") at various points already during
> yesterday's work, without results, but the fact that I can wait a while and
> thus get clearance to load it again safely imp;ies that some sort of garbage
> collection might be happening, and possibly in Windows itself? If you have
> any thoughts that might help track down a way to invoke it manually, it coule
> allow me to safely load a huge image any number of times without causing that
> display failure. One other clue: I've seen similar errors in other programs,
> which is why I'm convinced this is something in Windows. Crucially, tools
> like Paint Shop appear to be able to reload the image as often as I like
> without error, so that implies there IS a way, though whether it's something
> wxLua can reach I don't know yet.
>

You must also delete any wxBitmaps as they are also MSW GDI objects.

There's more about this here:
http://wxlua.sourceforge.net/docs/wxlua.html
search for "Must delete if > 50 : wxBitmap"

Hope this helps,
    John

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to