From: Andrew den Exter Date: Thu, 5 Apr 2012 01:33:59 +0000 (+1000) Subject: Don't leak unresolved items when a VisualDataModel is destroyed. X-Git-Tag: 071012131707~293 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=659450190b70e0fe68ed9ec9189908092ca0aae5;p=profile%2Fivi%2Fqtdeclarative.git 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 --- 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;