diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-12-08 05:11:23 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-12-08 05:11:23 (GMT) |
commit | 3e1b7110c1161b740c32ed0ee390f7030e8208ed (patch) | |
tree | 3fe04069fa8bb1894283111ce9a9521b9636e6e2 /src/declarative | |
parent | ad2a9bd8f0c0b57e1e40f5f93af21c018ceac86e (diff) | |
download | Qt-3e1b7110c1161b740c32ed0ee390f7030e8208ed.zip Qt-3e1b7110c1161b740c32ed0ee390f7030e8208ed.tar.gz Qt-3e1b7110c1161b740c32ed0ee390f7030e8208ed.tar.bz2 |
Fix leaks.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmlcompileddata.cpp | 3 | ||||
-rw-r--r-- | src/declarative/qml/qmlpropertycache.cpp | 1 | ||||
-rw-r--r-- | src/declarative/qml/qmlworkerscript.cpp | 1 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation_p_p.h | 2 |
5 files changed, 8 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index 7fb6454..135262c 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -1256,6 +1256,8 @@ QmlGraphicsListView::~QmlGraphicsListView() d->clear(); if (d->ownModel) delete d->model; + delete d->header; + delete d->footer; } /*! diff --git a/src/declarative/qml/qmlcompileddata.cpp b/src/declarative/qml/qmlcompileddata.cpp index 8b165c6..198b574 100644 --- a/src/declarative/qml/qmlcompileddata.cpp +++ b/src/declarative/qml/qmlcompileddata.cpp @@ -176,6 +176,9 @@ QmlCompiledData::~QmlCompiledData() for (int ii = 0; ii < propertyCaches.count(); ++ii) propertyCaches.at(ii)->release(); + for (int ii = 0; ii < contextCaches.count(); ++ii) + contextCaches.at(ii)->release(); + if (importCache) importCache->release(); diff --git a/src/declarative/qml/qmlpropertycache.cpp b/src/declarative/qml/qmlpropertycache.cpp index 7e3a1c4..bad8ad8 100644 --- a/src/declarative/qml/qmlpropertycache.cpp +++ b/src/declarative/qml/qmlpropertycache.cpp @@ -198,7 +198,6 @@ QmlPropertyCache *QmlPropertyCache::create(QmlEngine *engine, const QMetaObject cache->stringCache.insert(methodName, data); cache->identifierCache.insert(data->identifier.identifier, data); data->addref(); - data->addref(); } return cache; diff --git a/src/declarative/qml/qmlworkerscript.cpp b/src/declarative/qml/qmlworkerscript.cpp index 5c281bb..a0d6ef0 100644 --- a/src/declarative/qml/qmlworkerscript.cpp +++ b/src/declarative/qml/qmlworkerscript.cpp @@ -389,6 +389,7 @@ QmlWorkerScriptEngine::QmlWorkerScriptEngine(QObject *parent) QmlWorkerScriptEngine::~QmlWorkerScriptEngine() { + qDeleteAll(d->workers); delete d; d = 0; } diff --git a/src/declarative/util/qmlanimation_p_p.h b/src/declarative/util/qmlanimation_p_p.h index fbd7114..2f911b4 100644 --- a/src/declarative/util/qmlanimation_p_p.h +++ b/src/declarative/util/qmlanimation_p_p.h @@ -102,6 +102,7 @@ public: QActionAnimation(QObject *parent = 0) : QAbstractAnimation(parent), animAction(0), policy(KeepWhenStopped), running(false) {} QActionAnimation(QAbstractAnimationAction *action, QObject *parent = 0) : QAbstractAnimation(parent), animAction(action), policy(KeepWhenStopped), running(false) {} + ~QActionAnimation() { if (policy == DeleteWhenStopped) { delete animAction; animAction = 0; } } virtual int duration() const { return 0; } void setAnimAction(QAbstractAnimationAction *action, DeletionPolicy p) { @@ -145,6 +146,7 @@ class QmlTimeLineValueAnimator : public QVariantAnimation Q_OBJECT public: QmlTimeLineValueAnimator(QObject *parent = 0) : QVariantAnimation(parent), animValue(0), fromSourced(0), policy(KeepWhenStopped) {} + ~QmlTimeLineValueAnimator() { if (policy == DeleteWhenStopped) { delete animValue; animValue = 0; } } void setAnimValue(QmlTimeLineValue *value, DeletionPolicy p) { if (state() == Running) |