From: Martijn F. <fa...@ve...> - 2000-04-15 12:57:15
|
Hi there, I've discovered a memory leak in sdl_events_poll() and sdl_events_wait(), and also fixed them. I noticed my python processes becoming enormously huge very quickly in my event loop, and tracked it down to this: sdl.init(sdl.INIT_VIDEO) while 1: e = sdl.events_poll() And obviously that shouldn't happen. What I added was this: Py_Free(s_event_ref); in both functions, just before the last return statement: return Py_BuildValue("i", -1); That fixed it. PySDL is way cool, by the way. Python too. Amazing how quickly you can prototype a nice app; I now have objects which draw themselves when first used, but draw to a buffer and then later on use blit their pre-drawed contents, and the rest was pretty easy too. I can't do that in C or C++ so quickly. :) Regards, Martijn |