[PyKDE] ANNOUNCE: PyQt/PyKDE v0.10pre3

Phil Thompson phil at river-bank.demon.co.uk
Wed Nov 17 10:43:11 GMT 1999

I've put v0.10pre3 in the usual place at
http://www.river-bank.demon.co.uk/software/private/.  There is only one
significant change which I think is a good idea, but may cause the odd
problem - let me know.

In previous versions the Python reference counts of signal and slot
objects are incremented on calls to QObject.connect() and decremented
again on calls to QObject.disconnect().  When you do something like this
(taken from the Qt tutorials)...


...a circular reference is created which means (unless you explicitly
disconnect() the signal) the Python self object is never destroyed.

Most of the time this doesn't matter.  Most GUI's are fairly static, and
the underlying Qt widgets disappear as you'd expect so the program
appears correct visually - you just end up with a memory leak.

I've changed the implementation of signals and slots so the reference
count changes don't happen.  This makes the behaviour more natural (ie.
much closer to that of C++).  The disadvantage is that if you haven't
taken steps to keep the signal/slot objects alive then you are likely to
get a core dump should the signal ever be emitted.


More information about the PyQt mailing list