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

Memory Leak in QAbstractTableModel/QAbstractItemModel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.4.1
    • PySide
    • None
    • Windows 10. PySide6 6.4.1. Ran in conda env
    • Windows

      I have identified a memory leak in the implementation of QAbstractTableModel in PySide6, version 6.4.1. Using an example found on the Qt Website (https://doc.qt.io/qtforpython/examples/example_external__pandas.html)
      There is a constant increase in memory usage when scrolling through the table, resizing the window, clicking on cells, etc. This increase in memory will not decrease at any point. Preliminary analysis points to the implementation of data() as the culprit of the memory leak

      I used the exact same example above in PySide2 and there was not the above described memory leak.. This issue only exists in PySide6

      I went through many other examples found on the Qt website and any example implementing not only QAbstractTableModel, but QAbstractItemModel as well suffers from this memory leak.

      Some examples used
      https://doc.qt.io/qtforpython/examples/example_charts__modeldata.html
      https://doc.qt.io/qtforpython/examples/example_widgets_itemviews_jsonmodel.html

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            rmaierle Robert Maiele
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes