Hi I am experiencing memory leak in QML app using quickpromise.
I created simple app to demonstrate.
App have timer that does some async operation. async operation is handled using quickpromise.
Code below (with timer 1 sec), leaks approx 1.6MB/min, and eventually crashes (QT 5.11 @ MSWindows or Ubuntu 18)
Any suggestions ?
import QtQuick 2.5
import QtQuick.Window 2.2
import "promise.js" as Q
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World");
property int syncStoriesTimeoutInSec: 1;
Component.onCompleted: {
syncStories();
}
Timer {
id: syncStoriesTimer
interval: syncStoriesTimeoutInSec * 1000;
running: false; repeat: false
onTriggered: {
syncStories();
}
}
function syncStories() {
let p = Q.promise(function (resolve, reject) {
//for test purposes, resolve right away
resolve({});
});
p.then(
function(data) {
console.log("resolved");
syncStoriesTimer.start();
},
function(data) {
console.log("rejected");
}
)
}
}
Hi I am experiencing memory leak in QML app using quickpromise.
I created simple app to demonstrate.
App have timer that does some async operation. async operation is handled using quickpromise.
Code below (with timer 1 sec), leaks approx 1.6MB/min, and eventually crashes (QT 5.11 @ MSWindows or Ubuntu 18)
Any suggestions ?