diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-04-09 06:00:42 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-04-09 06:02:30 (GMT) |
commit | 6f796adeb7ba44791ca4faf144defac15b560fd0 (patch) | |
tree | 22dd34744ff875fecfba1b7b7626de260eacd9eb /src/declarative/util | |
parent | f8b02638aac881619442423b0e633740cc39ecf2 (diff) | |
download | Qt-6f796adeb7ba44791ca4faf144defac15b560fd0.zip Qt-6f796adeb7ba44791ca4faf144defac15b560fd0.tar.gz Qt-6f796adeb7ba44791ca4faf144defac15b560fd0.tar.bz2 |
Release ListModel's worker agent on deletion.
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 3 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativelistmodelworkeragent_p.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 28bd852..37bbb14 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -264,6 +264,9 @@ QDeclarativeListModel::QDeclarativeListModel(bool workerCopy, QObject *parent) QDeclarativeListModel::~QDeclarativeListModel() { + if (m_agent) + m_agent->release(); + delete m_nested; delete m_flat; } diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h index b6a643b..53d30c2 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h +++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h @@ -66,7 +66,6 @@ QT_MODULE(Declarative) class QDeclarativeListModel; -// Currently this will leak as no-one releases it in the worker thread class QDeclarativeListModelWorkerAgent : public QObject { Q_OBJECT |