[PyQt] Memory leak

Sundance sundance at ierne.eu.org
Fri Jul 4 09:48:13 BST 2008


Giovanni Bajo wrote:

> The assert triggers, meaning that the object of type MyWidget is not
> released.

Hi Giovanni,

Yes, this is a known bug: SIP keeps a hard reference to bound methods in 
its method cache (the bound method being ws.sizeHint in your example). 
Since bound methods keep a reference to the object they're bound to, 
your object is never freed and its memory is leaked.

I understand Phil is already on it.

-- S.


More information about the PyQt mailing list