[PyQt] Memory leak
Giovanni Bajo
rasky at develer.com
Fri Jul 4 10:24:32 BST 2008
On Fri, 2008-07-04 at 10:48 +0200, Sundance wrote:
> 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.
It's a rather new regression, though. It wasn't happening 6 months ago.
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
More information about the PyQt
mailing list