On 20 Jul, 16:17, Mel <mwil...@the-wire.com> wrote: > OTOH, if you intend to re-use the Dialog object, it's not a memory leak.
It cannot be reused if you don't have any references pointing to it. Sure it is nice to have dialogs that can be hidden and re-displayed, but only those that can be accessed again. tp_dealloc should free any C resources the object is holding. There is no need to save anything beyond the call to tp_dealloc. Before the call to tp_dealloc any C resources should be kept, for the reason you mentioned. That is why the parent-child method of clean-up is at odds with the Python garbage collection. Sturla -- http://mail.python.org/mailman/listinfo/python-list