windll event loop leaks
Robin Becker
robin at jessikat.fsnet.co.uk
Thu Nov 14 06:26:57 EST 2002
Hi, I'm trying to implement a calldll/windll backend for the anygui
project. I have working code, but it leaks so I'm looking for assistance
with how one should program/debug such a loop.
My test prog is a simple blank window. Using process explorer I can see
that the working memory increases when I just move the mouse around over
the window.
For comparison I tried Sam Rushing's dynwin/button.py and lo and behold
it also leaks.
The pythonwin backend which has a similar structure doesn't leak.
The loop I use is just
while user32.GetMessage(msg, 0, 0, 0):
try:
user32.TranslateMessage(msg)
user32.DispatchMessage(msg)
except:
logTraceback(None)
and my test seems to just end up calling the default window procedure
using user32.DefWindowProc(hwnd, msg, wParam, lParam).
Any help gratefully received. FWIW I'm using Python-2.2.2 Win2K sp2
--
Robin Becker
More information about the Python-list
mailing list