[PyQt] QTimer memory leek

Phil Thompson phil at riverbankcomputing.co.uk
Sun Oct 28 10:58:08 GMT 2007


On Friday 26 October 2007, Никитин Артем wrote:
> Hello,
>
> I got memory leak problem with QTimer (PyQt 4.3.1). Further, short example
> to detect problem.
>
> import sys
> from PyQt4 import QtCore, QtGui
>
> def schedule():
>   QtCore.QTimer.singleShot(0, schedule)
>
> def main( ):
>   qApp  = QtGui.QApplication(sys.argv)
>   schedule()
>   sys.exit(qApp.exec_())
>
> main()

This is a known feature but I agree that it's a problem in this particular use 
case. Fixed in tonight's snapshot.

Phil



More information about the PyQt mailing list