From 659450190b70e0fe68ed9ec9189908092ca0aae5 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 5 Apr 2012 11:33:59 +1000 Subject: [PATCH] Don't leak unresolved items when a VisualDataModel is destroyed. Clear the unresolved flag items on destruction of the model, otherwise the flag will hold a reference and prevent the item being destroyed. Change-Id: Ic67daf9cbb5676f7b55f6286baaaa3b5feb9fd3e Reviewed-by: Bea Lam --- src/quick/items/qquickvisualdatamodel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quick/items/qquickvisualdatamodel.cpp b/src/quick/items/qquickvisualdatamodel.cpp index a9b6e71..dfbf3a3 100644 --- a/src/quick/items/qquickvisualdatamodel.cpp +++ b/src/quick/items/qquickvisualdatamodel.cpp @@ -204,6 +204,7 @@ QQuickVisualDataModel::~QQuickVisualDataModel() cacheItem->contextData = 0; cacheItem->scriptRef -= 1; } + cacheItem->groups &= ~Compositor::UnresolvedFlag; cacheItem->objectRef = 0; if (!cacheItem->isReferenced()) delete cacheItem; -- 2.7.4