<html><body>
<p><font size="2">Hello,</font><br>
<br>
<font size="2">attached the file containing the source.</font><br>
<br>
<font size="2">Best regards,</font><br>
<font size="2">Carl.</font><br>
<br>
<font size="2">-<br>
Carl Wolff</font><i>(See attached file: leak.py)</i><font size="2"><br>
Consultant<br>
<br>
Tel, 033-4543333<br>
Mob: 06-53469668<br>
www.imtech.nl<br>
</font><br>
<br>
<tt><font size="2">pyqt-bounces@riverbankcomputing.com wrote on 22-08-2011 20:00:31:<br>
<br>
> Carl Wolff <carl.wolff@imtech.nl> </font></tt><br>
<tt><font size="2">> Sent by: pyqt-bounces@riverbankcomputing.com<br>
> </font></tt><br>
<tt><font size="2">> 22-08-2011 20:02</font></tt><br>
<tt><font size="2">> <br>
> To</font></tt><br>
<tt><font size="2">> <br>
> pyqt@riverbankcomputing.com</font></tt><br>
<tt><font size="2">> <br>
> cc</font></tt><br>
<tt><font size="2">> <br>
> Subject</font></tt><br>
<tt><font size="2">> <br>
> [PyQt] Leak found in PyQt version 4.8.5-1 / 4.8.5 win32 build</font></tt><br>
<tt><font size="2">> <br>
> Hello,<br>
> the following piece of code leaks:<br>
> <br>
> import PyQt4.QtGui<br>
> import PyQt4.QtCore<br>
> import time<br>
> <br>
> app = PyQt4.QtGui.QApplication([])<br>
> mainWindow = PyQt4.QtGui.QMainWindow()<br>
> <br>
> while True:<br>
> button = PyQt4.QtGui.QPushButton(mainWindow)<br>
> button.parent().findChild(PyQt4.QtCore.QObject, "foo")<br>
> button.setParent(None)<br>
> time.sleep(0.01)<br>
> <br>
> When the findChild call is not done this code does not leak. So the <br>
> leak cause seems to be located somewhere in the findChild <br>
> processing, or I must be doing something wrong.<br>
> <br>
> In older version 4.7.3-2 this leak was not there.<br>
> <br>
> Best regards.<br>
> Carl.<br>
> _______________________________________________<br>
> PyQt mailing list    PyQt@riverbankcomputing.com<br>
> <a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></font></tt></body></html>