summaryrefslogtreecommitdiffstats
path: root/src/quick3d/quick3d/items
diff options
context:
space:
mode:
authorMauro Persano <mauro.persano@kdab.com>2017-06-08 19:20:35 -0300
committerMauro Persano <mauro.persano@kdab.com>2017-06-14 11:15:42 +0000
commitd7cf1685706a19e2455e178c52646c8a54b751e5 (patch)
treef90e5475bbd6d0d70413517e87ea3c3003c61f14 /src/quick3d/quick3d/items
parent8155dae53f4b9f9d2c9d198758fe8c636c2e1cd1 (diff)
Fix memory leak in Quick3DNodeInstantiatorPrivate
Objects are managed by the instance model, so delete instead of deleting objects directly. Task-number: QTBUG-61293 Change-Id: I6ff17e646fce60bf12d575c4c377bee3c82a60cb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick3d/quick3d/items')
-rw-r--r--src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
index 1626554ea..c6e8aa7c1 100644
--- a/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
+++ b/src/quick3d/quick3d/items/quick3dnodeinstantiator.cpp
@@ -98,7 +98,8 @@ Quick3DNodeInstantiatorPrivate::Quick3DNodeInstantiatorPrivate()
Quick3DNodeInstantiatorPrivate::~Quick3DNodeInstantiatorPrivate()
{
- qDeleteAll(m_objects);
+ if (m_ownModel)
+ delete m_instanceModel;
}
void Quick3DNodeInstantiatorPrivate::clear()