Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
4.8.4, 5.0.0, 5.2.0 Beta1 , 5.3.1
-
Linux, embedded linux, Windows 7
-
d50a57f408a9cc160c187c012f51b8fa89738858
Description
Please run the attached code in QtQuick 1.1 or QtQuick 2.0,
and observe the dirty memory with pmap -x <PID>
import QtQuick 1.1 Rectangle { id: top width: 200; height: 200 color: "white" property variant item Timer { id: timer running: true; repeat: true interval: 5 onTriggered: { if(item) item.destroy(); item = Qt.createQmlObject('import QtQuick 1.1; Rectangle {color: "red"; width: 50; height: 50; radius: 20; anchors.centerIn:parent; function test(){}}', top); } } Timer{ id: timer2 running: true; repeat: true interval: 50 onTriggered: gc(); } }
The Dirty memory increases constantly until the application is manually closed or closed by OOM killer in low memory devices.
calling of gc() also doesn’t help.
Also, if it doesnt have the javascript function "test" called, it works well.
item = Qt.createQmlObject('import QtQuick 1.1; Rectangle {color: "red"; width: 50; height: 50; radius: 20; anchors.centerIn:parent}',top);
Attachments
Issue Links
- resulted in
-
QTBUG-42055 QML Memory leak
- Closed