[PyKDE] Regression caused by lambda as slots
Giovanni Bajo
rasky at develer.com
Wed Jan 17 23:33:46 GMT 2007
On 17/01/2007 18.09, Giovanni Bajo wrote:
> I think I have managed to produce a (convoluted) testcase for what
> appears to be a reference leak introduced by recent SIP versions. It
> ought to be when you added support for lambda expressions as slots.
I think I know the problem: sipWrapper_traverse() does not know anything about
lambda expressions in slots. Thus, the GC can't fully traverse the lambda
expressions (whose reference is being kept by the sender object), and can't do
a full collection of all unreachable items.
I could attempt a fix but I'm not sure how you want to deal with it, since the
signal/slot part is pretty internal of qtlib.c, while sipWrapper_traverse() is
in siplib.c. Also, I don't fully understand all the semantics of sipSlot (all
the combinations of possible NULLs/values for its members) so I'd rather leave
this to you.
--
Giovanni Bajo
More information about the PyQt
mailing list