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>
This commit is contained in:
Mauro Persano 2017-06-08 19:20:35 -03:00
parent 8155dae53f
commit d7cf168570
1 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,8 @@ Quick3DNodeInstantiatorPrivate::Quick3DNodeInstantiatorPrivate()
Quick3DNodeInstantiatorPrivate::~Quick3DNodeInstantiatorPrivate()
{
qDeleteAll(m_objects);
if (m_ownModel)
delete m_instanceModel;
}
void Quick3DNodeInstantiatorPrivate::clear()