aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-06-26 14:52:22 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-02 16:33:05 +0000
commit48c09a85ce397979c7e706e3694c879ffe456e09 (patch)
treecc2c437bb35f05cc68ef384ba00b833cfde11033 /src/qml/jsapi
parent4d393779e7a6ec09267f40420f39f8dc28ed7aef (diff)
Remove unused types on engine destruction
The QML engine destructor as well as trimComponentCache() do now clean out unused composite types that the engine registered internally. This helps avoid 'static' leaks, when more and more types would get registered by the engine. Task-number: QTBUG-61536 Change-Id: I5b32af4b88fbf626de8c0bfbaedb2285b09e3679 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 35b4929c3a..d5b8b295a7 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -730,7 +730,7 @@ QJSEnginePrivate *QJSEnginePrivate::get(QV4::ExecutionEngine *e)
QJSEnginePrivate::~QJSEnginePrivate()
{
- // ### FIXME: sweep unused QQmlType instances
+ QQmlMetaType::freeUnusedTypesAndCaches();
}
void QJSEnginePrivate::addToDebugServer(QJSEngine *q)