[PyKDE] Bad Memory Leak

Andre Reitz reitz at inworks.de
Wed Dec 6 05:37:06 GMT 2006


Hello all, not really sure if I
am right here with my problem, but there is a
great Memoryleak:


--------------------------------------------------
from qt import *
app=QApplication([])
def c():
	print "cc"

sss=SIGNAL("clicked()")
while 1:
	d=QDialog()
	b=QPushButton("x",d)
	QObject.connect(b,sss,c) #<-------XXX
	d.exec_loop()
	del b
	del d

--------------------------------------------------

Stay on the escape key, so that many many dialogs
will be created and deleted.

Watch used Memory and you will see it increases
significantly.

If you comment aut the marked line (QObject.connect)
then the problem does not occur.

Problem occurs on linux (PyQt-3.5.1-19 (SuSE))
and on Windows (PyQt-3.11 and PyQt-3.14)

Greetings, Andre'




More information about the PyQt mailing list