PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 815 - QTimer.singleShot causes memory leak
: QTimer.singleShot causes memory leak
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: 1.0.1
: PC Linux
: P2 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-07 02:08 EEST by Luke
Modified: 2011-04-29 18:06 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2011-04-07 02:08:14 EEST
On my machine, the following example will consume memory until the heat-death
of the universe (or the termination of the process, which ever comes first):

>>> from PySide import QtGui, QtCore
>>> app = QtGui.QApplication([])                                                                                                                           
>>> timer = QtCore.QTimer()
>>> def fn():
...   timer.singleShot(1, fn)
...                                                                             
>>> fn()
>>> app.exec_()

The objects being leaked are dicts looking like:
  {'timeout': QtCore.QSignal(...)}
Comment 1 Hugo Parente Lima 2011-04-07 16:09:37 EEST
I can reproduce the leak, thanks for detect and report it.
Comment 2 renato filho 2011-04-21 00:50:22 EEST
fixed on pyside commit:

db9547be72d4e44bab72704b1de86ccffc3e7f07
Comment 3 renato filho 2011-04-29 18:06:08 EEST
PySide release 1.0.2