Hi, since my system upgraded SIP to 4.10 (and KDE to 4.4) my own PyKDE4 app Frescobaldi has strange garbage collection issues all over the place, with error messages like:
NameError: free variable 'docGroup' referenced before assignment in enclosing scope It seems that when I connect a local or lambda function to a Qt signal, the function remains alive but it looses the references its outer variables! The objects those outer variables point to are still there (they work as usual), but they just become unreachable from local or lambda functions. I can circumvent the problem by passing in those outer variables as default arguments, but that is kind of clumsy. How come the outer variables are garbage collected but the function containing them not? Is this a bug in SIP or PyQt or should I adapt a different coding style? (i.e. without anonymous or local functions) ? ... w best regards, Wilbert Berendsen -- http://www.wilbertberendsen.nl/ "You must be the change you wish to see in the world." -- Mahatma Gandhi _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
