aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-04-01 11:07:18 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-01 19:53:51 +0200
commit329a3462903c60876be3449c82d0bc16b72bf402 (patch)
treed88f44a9433f9ee659e0af02c5b7619edcecd50c /src/qml/qml/qqmlengine.cpp
parentd88f6f2345c2a2c7f93ebf73ac9a90edad0c9979 (diff)
Document percieved memory leak
QJSEngine doesn't call collectGarbage upon deletion, because this operation can be expensive and in most cases the JS engine is deleted during application shutdown, when the memory can be deallocated cheaper. This can lead to an apparent memory leak if multiple engines are created and destroyed in the same process. Documenting how to avoid this. Change-Id: Ie02cb8bedc8821e0bb04dfa52a5a2d65b4b085a3 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 5fa5cfd9ef..1c3aff6892 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -831,6 +831,8 @@ QQmlEngine::QQmlEngine(QQmlEnginePrivate &dd, QObject *parent)
Any QQmlContext's created on this engine will be
invalidated, but not destroyed (unless they are parented to the
QQmlEngine object).
+
+ See QJSEngine docs for details on cleaning up the JS engine.
*/
QQmlEngine::~QQmlEngine()
{