[PyQt] Garbage collection, signals to partial functions

Phil Thompson phil at riverbankcomputing.com
Wed Oct 28 21:09:55 GMT 2009


On Wed, 28 Oct 2009 16:53:51 +0100, Martin Teichmann
<martin.teichmann at mbi-berlin.de> wrote:
> Hi List,
> 
> I just connected a signal from one object "a" to a slot which
> is a partial function, calling a method in another object "b".
> 
> That works fine, just when I don't need the objects anymore,
> nothing is garbage collected. It seems that the reference
> counter on the partial object is increased when connected,
> as documented, but not decreased once object "a"
> disappears.
> 
> I tried it on windows, python 2.5.4 and PyQt4 4.6
> and linux, Python 2.6.2, PyQt4 4.4, no difference.
> 
> The program following this mail illustrates the bug.

Works fine for me (None is always displayed) with current snapshots.

Phil


More information about the PyQt mailing list