Fix leak in QQuickParticleData
authorChris Adams <christopher.adams@nokia.com>
Thu, 17 Nov 2011 01:56:22 +0000 (11:56 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 17 Nov 2011 23:20:47 +0000 (00:20 +0100)
Task-number: QTBUG-22672

Change-Id: I14b436b0d968409bd71a6bf65db6c994f08dece1
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>

src/declarative/particles/qquickparticlesystem.cpp
src/declarative/particles/qquickparticlesystem_p.h

index 613587a..d6f1cc6 100644 (file)
@@ -428,6 +428,11 @@ QQuickParticleData::QQuickParticleData(QQuickParticleSystem* sys)
     modelIndex = -1;
 }
 
+QQuickParticleData::~QQuickParticleData()
+{
+    delete v8Datum;
+}
+
 void QQuickParticleData::clone(const QQuickParticleData& other)
 {
     x = other.x;
index 87f2f2a..e3c46f7 100644 (file)
@@ -147,6 +147,7 @@ class Q_AUTOTEST_EXPORT QQuickParticleData {
 public:
     //TODO: QObject like memory management (without the cost, just attached to system)
     QQuickParticleData(QQuickParticleSystem* sys);
+    ~QQuickParticleData();
 
     //Convenience functions for working backwards, because parameters are from the start of particle life
     //If setting multiple parameters at once, doing the conversion yourself will be faster.