diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-12-05 16:21:03 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-06 15:18:47 +0100 |
commit | adaedcb9ead1c536ff3d8fba0fb9f4fc262d4d45 (patch) | |
tree | 7d798f62b3ad61a038468e4e418899388966f968 /src/quick/items/qquickloader_p_p.h | |
parent | 433949df18625e5a04d8e83908ee51f703380f21 (diff) |
Fix crash in QQuickLoader when source component is garbage collected
It may happen that the QQuickLoader is the last entity left in the system
holding a reference to the QQmlComponent *sourceComponent. We have to let the
garbage collector know about that by keeping a persistent value for it.
Task-number: QTBUG-35334
Change-Id: I715864440378fd9dd4f2d5ef8ff2f171c81ed7ef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/quick/items/qquickloader_p_p.h')
-rw-r--r-- | src/quick/items/qquickloader_p_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h index 9c94b4ce38..32c271222d 100644 --- a/src/quick/items/qquickloader_p_p.h +++ b/src/quick/items/qquickloader_p_p.h @@ -106,6 +106,7 @@ public: QQuickItem *item; QObject *object; QQmlComponent *component; + QV4::PersistentValue componentStrongReference; // To ensure GC doesn't delete components created by Qt.createComponent QQmlContext *itemContext; QQuickLoaderIncubator *incubator; QV4::PersistentValue initialPropertyValues; |