From 262c7d1fdc5dfbd8c2e9f84d1d3055735b5bc4b3 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 7 Sep 2009 10:06:36 +1000 Subject: Fix leaks. --- src/declarative/fx/qfxgridview.cpp | 1 + src/declarative/fx/qfxlistview.cpp | 1 + src/declarative/fx/qfxpainteditem.cpp | 1 + src/declarative/fx/qfxtextinput_p.h | 1 + src/declarative/qml/qmlengine.cpp | 4 ++++ src/declarative/util/qmllistmodel.cpp | 1 + 6 files changed, 9 insertions(+) diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index 6fd080b..13d274a 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -699,6 +699,7 @@ QFxGridView::QFxGridView(QFxItem *parent) QFxGridView::~QFxGridView() { Q_D(QFxGridView); + d->clear(); if (d->ownModel) delete d->model; } diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 523786f..c24610f 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -881,6 +881,7 @@ QFxListView::QFxListView(QFxItem *parent) QFxListView::~QFxListView() { Q_D(QFxListView); + d->clear(); if (d->ownModel) delete d->model; } diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp index cbd00cf..5471e1b 100644 --- a/src/declarative/fx/qfxpainteditem.cpp +++ b/src/declarative/fx/qfxpainteditem.cpp @@ -175,6 +175,7 @@ QFxPaintedItem::QFxPaintedItem(QFxPaintedItemPrivate &dd, QFxItem *parent) */ QFxPaintedItem::~QFxPaintedItem() { + clearCache(); } /*! diff --git a/src/declarative/fx/qfxtextinput_p.h b/src/declarative/fx/qfxtextinput_p.h index 22a5306..b533854 100644 --- a/src/declarative/fx/qfxtextinput_p.h +++ b/src/declarative/fx/qfxtextinput_p.h @@ -72,6 +72,7 @@ public: ~QFxTextInputPrivate() { + delete control; } void init(); diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 3d8b2c4..a31d014 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -144,6 +144,10 @@ QmlEnginePrivate::~QmlEnginePrivate() contextClass = 0; delete objectClass; objectClass = 0; + delete valueTypeClass; + valueTypeClass = 0; + delete typeNameClass; + typeNameClass = 0; delete networkAccessManager; networkAccessManager = 0; delete nodeListClass; diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 98c552f..0d9ea94 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -230,6 +230,7 @@ QmlListModel::QmlListModel(QObject *parent) QmlListModel::~QmlListModel() { + delete _root; } void QmlListModel::checkRoles() const -- cgit v0.12