Re: Re[2]: win32lib v0.57.4 released
- Posted by Derek Parnell <ddparnell at bigpond.com> May 12, 2002
- 457 views
----- Original Message ----- From: "Thomas Parslow (PatRat)" <tom at almostobsolete.net> To: "EUforum" <EUforum at topica.com> Subject: Re[2]: win32lib v0.57.4 released > > > Thomas Parslow (PatRat) wrote: > >> > - "by Thomas Parslow". GDI resource leak using wPuts and queryFont > >> > removed. > >> > >> Hi, > >> > >> This bug still seems to be present, applying the fix I posted before > >> still works though... > >> > >> http://www.rapideuphoria.com/cgi-bin/esearch.exu?fromMonth=4&fromYear=7&toMo nth=4&toYear=7&postedBy=thomas+parslow&keywords=queryFont+wPuts > >> > >> > > That's weird Thomas. I tested it and got no resource leakage. Maybe my > > testing process is flawed. How exactly are you seeing the resource > > leakage? > > As for your fix, yes it worked but I needed a more generic way of doing > > it, so I adapted your code to catch all font leaks, now and in the > > future. (Or so I thought). > > ----------- > > Derek. > > Hi, > > I've attached a test program which demonstrates the problem (using > wPuts, it's exactly the same with queryFont). I'm noticing it by > watching the Task Manager (set to show GDI object usage). > > I'm using windows XP here so maybe that would explain the difference > if you still don't see the problem... > Thanks Thomas, this is the same problem as with drawRectangle() leak. Both wPuts() and queryFont() assumed they were being run inside a Paint event handler. I've fixed now so they don't always assume that. ---------- Derek.