diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 5fa5cfd9efdac74cd03ea97b9794cdc5713cbe0c..1c3aff68923768d9258c60af163e6981de836a57 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() { diff --git a/src/qml/qml/v8/qjsengine.cpp b/src/qml/qml/v8/qjsengine.cpp index 5b1464afe676938377c71c171fd03c1f072c795f..dbd0851fec10fa246633a37234fcc428d60784b3 100644 --- a/src/qml/qml/v8/qjsengine.cpp +++ b/src/qml/qml/v8/qjsengine.cpp @@ -195,6 +195,10 @@ QJSEngine::QJSEngine(QJSEnginePrivate &dd, QObject *parent) /*! Destroys this QJSEngine. + + Garbage is not collected from the persistent JS heap during QJSEngine + destruction. If you need all memory freed, call collectGarbage manually + right before destroying the QJSEngine. */ QJSEngine::~QJSEngine() {