From 517d7eadaa8bd7dbc61f9247e8f67ee5eac493a9 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Tue, 23 Feb 2016 00:25:20 +0800 Subject: QQuickAnimatedSprite: fix memory leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the QSGGeometryNode owns the geometry, so we need to set the flag to avoid a memory leak Change-Id: Ifaf1e88c437b765a76d7ab4028c63d66413440bb Reviewed-by: Jan Arve Sæther --- src/quick/items/qquickanimatedsprite.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp index e37ed6c18c..5f77c6461f 100644 --- a/src/quick/items/qquickanimatedsprite.cpp +++ b/src/quick/items/qquickanimatedsprite.cpp @@ -538,6 +538,7 @@ QSGGeometryNode* QQuickAnimatedSprite::buildNode() m_node->setGeometry(g); m_node->setMaterial(m_material); m_node->setFlag(QSGGeometryNode::OwnsMaterial); + m_node->setFlag(QSGGeometryNode::OwnsGeometry); sizeVertices(); return m_node; } -- cgit v1.2.3