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

QML : Memory leak with Loader and PageIndicator component

    XMLWordPrintable

Details

    • Linux/Other display system, Windows

    Description

      An exemple to test this memory leak about PageIndicator loaded with a Loader 

      This example can be tested with qmlscene

      In a shell : "qmlscene.exe PageIndicatorTest.qml" 
      To view the memory, look for the value in the monitoring windows. (the memory grow up quickly!)

       

      Tested in Qt5.9.1 Linux &Windows 10

      Tested in Qt5.9.7 Windows 10

      Tested in Qt5.11.1 Windows 10

       

       

      Code is very simple : 

      import QtQuick 2.9
      import QtQuick.Controls 2.2
      import QtQml 2.2
      
      
      
      Rectangle {
      	id: pageIndicatorTest
      
      	Component {
      		id : pageIndicatorComponentTest
      		Column {
      			Repeater {
      				model: 20
      				PageIndicator {
      					currentIndex: index
      					count: 20 
      				}
      			}
      		}
      	}
      	
      	Loader { 
      		id: loaderPageIndicator
      		sourceComponent : pageIndicatorComponentTest 
      	}
      	
      	Timer {
      		interval: 1000; running: true; repeat: true
      		onTriggered: {
      			console.log("loaded pageIndicatorTest")
      			loaderPageIndicator.sourceComponent = undefined; //unload component
      			loaderPageIndicator.sourceComponent = pageIndicatorComponentTest;
      		}
      	}
      
      }
      

       

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            franck85 Franck NAULLEAU
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes