Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-493

Python object leaked for child when parent is deleted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • 5.9
    • 1.2.1, 1.2.2
    • PySide
    • None
    • No leak on:
      Ubuntu 12.04 32-bit, Python 2.7.3, PySide 1.1.0

      Leaks on:
      Ubuntu 14.04 64-bit, Python 2.7.6, PySide 1.2.1
      Ubuntu 16.04 64-bit, Python 2.7.12, PySide 1.2.2

    Description

      In recent versions of PySide (1.2.1 and 1.2.2), the Python object associated with child widgets are leaked if the parent widget is deleted.

      I have included an example that shows the Python garbage collector holding references to the deleted objects. shiboken.dump() confirms the C++ object was deleted.

      Widgets that PySide knows about:
      <PySide.QtGui.QWidget object at 0x7f5976c8f638>
      <PySide.QtGui.QDesktopWidget object at 0x7f5976c93560>
      The garbage collector knows about 32478 objects
      Found one: 140022221698616 <type 'PySide.QtGui.QWidget'>
      Found one: 140022221698832 <type 'PySide.QtGui.QLabel'>
      Found one: 140022221713920 <type 'PySide.QtGui.QLabel'>
      Found one: 140022221713776 <type 'PySide.QtGui.QLabel'>
      ...
      

      Attachments

        Activity

          People

            ctismer Christian Tismer
            carlsonmark Mark Carlson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: