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

Memory leak with QtQuick Controls TabView

    XMLWordPrintable

    Details

      Description

      The attached example creates and deletes tabs in a tabview and leaks memory.

       

      Relevant comment from the other bug report:

      "if you change the tabview to a loader there are no error messages but there is still the memory issue (on 5.9.4 but not on 5.8.0)" 

          ColumnLayout {
              anchors.fill: parent
              RowLayout {
                  C.SpinBox { id: timerInterval; value: 20; minimumValue: 10; maximumValue: 2000 }
                  C.Button {
                      id: btnStartStop
                      text: "Start/Stop"
                      onClicked: {
                          timer.running = !timer.running
                      }
                  }
                  Text {
                      text: counter + " items loaded..."
                  }
              }
      
              Loader {
                  id: loader
                  Layout.fillHeight: true
                  Layout.fillWidth: true
              }
          }
      
          property int counter: 0
          Timer {
              id: timer
              interval: timerInterval.value
              repeat: true
              onTriggered: {
                  counter++
                  loader.setSource("qrc:/Page1.qml")
              }
          }
      

       

       

      Reported original by Wilfried Hafner

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              shausman Simon Hausmann
              Reporter:
              shausman Simon Hausmann
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes