diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-23 22:13:42 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-05-24 09:51:51 +0200 |
commit | fa2d572d5d202b05ed1908ea1119a1995960ce1f (patch) | |
tree | a53782ee1b94ac0856e6336b2386e717f4102d4e /src/qml/qml/qqmldata_p.h | |
parent | ee90b4efa521287e96b7ce23a2bc1d56e1b526fd (diff) |
Fix QObject ownership
Implement the JS vs. C++ ownership policy. QV4::WeakValue is a weak
reference that's now used instead of PersistentValue in QQmlData.
Whether or not to delete the QObject when the JS object is garbage
collected is decided in the ~QObjectWrapper destructor (conveniently).
Fixes four ownership tests.
Change-Id: Iedeb498f510295b5e656d0bb3b324084efa98f0f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r-- | src/qml/qml/qqmldata_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h index 096e358a73..98407e53b5 100644 --- a/src/qml/qml/qqmldata_p.h +++ b/src/qml/qml/qqmldata_p.h @@ -179,7 +179,7 @@ public: unsigned int deferredIdx; quint32 v8objectid; - QV4::PersistentValue v8object; + QV4::WeakValue v8object; QQmlPropertyCache *propertyCache; |