[PyKDE] QObject.queryList() memory leak problem

Ümit Öztosun umit.oztosun at gmail.com
Thu Apr 14 16:19:08 BST 2005


Hello,

When using QObject.queryList() with an inheritsClass parameter [i.e.
self.queryList('QWidget')], the objects returned by the query gains an
extra reference AFAIU. However, without parameters, it works as
expected.

The attached script demonstrates the problem, it repeatedly creates
and then destroys a dialog. You can monitor the constant leak with any
process viewer. On the other hand, simply deleting the 'QWidget'
parameter at line 36 solves the problem, no leak occurs.

Tested on Debian Testing, Python 2.4, Qt 3.3.3, both sip-4.2.1 /
PyQt-3.14.1 and sip-snapshot-20050403 /
PyQt-x11-gpl-snapshot-20050409.

Best Regards,
Umit Oztosun
-------------- next part --------------
A non-text attachment was scrubbed...
Name: querylist_test.py
Type: text/x-python
Size: 2279 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20050414/f5217aae/querylist_test.py


More information about the PyQt mailing list