Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
5.9
-
qmlscene on qt5.9.X
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; } } }