aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-09-17 13:29:28 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-09-25 18:53:22 +0000
commit4ac2e518805f4458db55c1dac3a061952380cbc1 (patch)
tree3ec1261280d65933f0ab340508fb36e248277bf3 /src/qml/qml/qqmlvmemetaobject.cpp
parentf01bfcf8edf94f27c24fb3bbaf738bc6134ec4c1 (diff)
Properly refcount the property cache
Change-Id: Ia37d4a5e64b653c9af614ed633c3c443190d015a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index debc839c1f..3a89e4c43d 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -154,6 +154,8 @@ QQmlVMEMetaObject::QQmlVMEMetaObject(QObject *obj,
hasAssignedMetaObjectData(false), aliasEndpoints(0),
interceptors(0), methods(0)
{
+ cache->addref();
+
QObjectPrivate *op = QObjectPrivate::get(obj);
if (op->metaObject) {
@@ -212,6 +214,8 @@ QQmlVMEMetaObject::~QQmlVMEMetaObject()
delete [] methods;
qDeleteAll(varObjectGuards);
+
+ cache->release();
}
QV4::MemberData *QQmlVMEMetaObject::propertiesAsMemberData()