1. [win32lib] demo\BkGnd16.exw resource leak

Hi Derek,
the following change needs to be done in
Demo\BkGnd16.exw, otherwise it allocates
a new bitmap every time the button is clicked:

F:\Downloads\w32005800\Demo>diff -ru BkGnd16.exw BkGnd16-new.exw
--- BkGnd16.exw Sat Nov 04 20:22:00 2000
+++ BkGnd16-new.exw     Thu Feb 27 13:33:17 2003
@@ -80,6 +80,10 @@
       bmtype = 1
    end if

+   if hBitmap then
+       -- delete the old bitmap
+       deleteObject(hBitmap)
+   end if
    hBitmap = loadBitmapFromFile(tilenames[bmtype])

   repaintWindow(MyWindow)


Regards,
      Martin Stachon

martin.stachon at tiscali.cz
http://www.webpark.cz/stachon

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu