Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.7.0
-
None
-
Windows 7 / 10 with VS2015 Qt 5.7.0 32-Bit on a 64-Bit machine
Description
Executing a simple QML-Script with the QmlEngine like this:
import QtQml 2.2
import "file:///E:/Dev/Qt-Test/JavaScriptMemoryLeak/Testskript/MemoryLeak.js" as SPS_Script
QtObject
where the java script function "main()" ist defined as:
function main()
{
var counter = 0;
var isExit = false;
while(!isExit)
return "done: counter = " + counter;
}
cause a memory leak while calling a c++ object methode "bool oIsExitRequest() const".
The c++ object is handed over with
"mEnginePtr->rootContext()->setContextProperty("exitController", &mExitController);".
The memory leak increases with each call of "oIsExitRequest()".
Manually triggering the garbage collector has no effect.
The attached VS2015 Project shows the memory leak in action.