Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21084

Memory usage keeps increasing when creating and destructing ListModel

    XMLWordPrintable

Details

    • c1491c356f3cca92a359468ce37f38bc1873eec4 91096126440aafba22aeb9307cb72135b3156a4c

    Description

      I have an application that has a loader that is loaded with a ListView that contains a model. If I repetitively load and unload the loader with this ListView the memory keeps increasing and never stops. The memory usage does not increase if I keep the model in memory all the time so that I create it in root level and reference to it in the ListView.

      I attached minimal application that demonstrates the behavior. main.qml got all the logic and LeakListMode.qml got simple model.

      The application UI has red and green rectangle. Pressing the red rectangle contiguously causes the memory increase but pressing the green one does not.

      Attachments

        1. LeakListModel.qml
          3 kB
        2. main.qml
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mread Murray Read
            kiilholm Mikko Kiilholma
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes