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

Memory Leak with custom QAbstractTableModeland TableView

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.6
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
    • Environment:
      Windows 7 Python 3.6 x64

      Description

      I noticed a memory leak by subclassing QtCore.QAbstractTableModel, and using it in a 

      QtWidgets.QTableView. The memory usage increases slowly when scrolling left/right and top/bottom. The memory usage increases more rapidly when resizing the window also.

      The memory usage never comes back the initial usage even after closing the window.

       

      PySide 1 also have the same bug. I attached tableview.py (PySide) and tableview2.py (PySide2) source.

        Attachments

        1. memory usage.png
          memory usage.png
          6 kB
        2. tableview.py
          2 kB
        3. tableview2.py
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              ctismer Christian Tismer
              Reporter:
              moralex1 Alexandre Morris
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes