aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-09-18 16:26:17 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-09-19 06:48:31 +0000
commit71a18fd64c93afa00f4d89de2ba47663f41eba2c (patch)
treeaed7d1f4bb6c4a69564a4a3f43a21d183cc77030 /src/qml/qml/qqmlmetatype_p.h
parent44ae9cdb95b14813d339c7bbd00df608261c8b9d (diff)
Fix qmlClearTypeRegistrations() not dropping all registrations
In commit 48c09a85ce397979c7e706e3694c879ffe456e09 we added the undeletableTypes container to hold a reference on C++ registered types to keep the indices returned by the public qmlRegisterType() API stable. Since qmlClearTypeRegistrations() is API that also resets those indices, we must also clear the undeletableTypes container to avoid leaking memory. Change-Id: I2038c00913f894d58aca3714d64d497493585326 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlmetatype_p.h')
-rw-r--r--src/qml/qml/qqmlmetatype_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index 9a7736ffcd..74b1cf0e06 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -245,6 +245,7 @@ public:
QQmlTypePrivate *priv() const { return d; }
static void refHandle(QQmlTypePrivate *priv);
static void derefHandle(QQmlTypePrivate *priv);
+ static int refCount(QQmlTypePrivate *priv);
enum RegistrationType {
CppType = 0,