[PyQt] Leak found in PyQt version 4.8.5-1 / 4.8.5 win32 build

Carl Wolff carl.wolff at imtech.nl
Mon Aug 22 19:31:45 BST 2011


Hello,

attached the file containing the source.

Best regards,
Carl.

-
Carl Wolff(See attached file: leak.py)
Consultant

Tel, 033-4543333
Mob: 06-53469668
www.imtech.nl


pyqt-bounces at riverbankcomputing.com wrote on 22-08-2011 20:00:31:

> Carl Wolff <carl.wolff at imtech.nl>
> Sent by: pyqt-bounces at riverbankcomputing.com
>
> 22-08-2011 20:02
>
> To
>
> pyqt at riverbankcomputing.com
>
> cc
>
> Subject
>
> [PyQt] Leak found in PyQt version 4.8.5-1 / 4.8.5 win32 build
>
> Hello,
> the following piece of code leaks:
>
> import PyQt4.QtGui
> import PyQt4.QtCore
> import time
>
> app = PyQt4.QtGui.QApplication([])
> mainWindow = PyQt4.QtGui.QMainWindow()
>
> while True:
> button = PyQt4.QtGui.QPushButton(mainWindow)
> button.parent().findChild(PyQt4.QtCore.QObject, "foo")
> button.setParent(None)
> time.sleep(0.01)
>
> When the findChild call is not done this code does not leak. So the
> leak cause seems to be located somewhere in the findChild
> processing, or I must be doing something wrong.
>
> In older version 4.7.3-2 this leak was not there.
>
> Best regards.
> Carl.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110822/a1979cb4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leak.py
Type: application/octet-stream
Size: 302 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110822/a1979cb4/attachment.obj>


More information about the PyQt mailing list