summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-02-08 15:40:50 (GMT)
committerTobias Markmann <tm@ayena.de>2015-02-09 15:36:19 (GMT)
commit1c64e31945e80e927f87a0a94ec5ce0e00c40a7f (patch)
tree80f00a3d133ec27945445728ec312c5900c0f975 /Swift/QtUI/UserSearch/QtContactListWidget.cpp
parentef319397be8439482fdf95f46a29643d15980b37 (diff)
downloadswift-1c64e31945e80e927f87a0a94ec5ce0e00c40a7f.zip
swift-1c64e31945e80e927f87a0a94ec5ce0e00c40a7f.tar.bz2
Fix memory leaks reported by LSAN
Qt models are not owned by their widgets. They must be deleted manually or a parent has to be specified for them which will take care of deletion. The same goes for delegates and their views. Test-Information: Tested with Clang's leak sanitizer (part of address sanitizer). The leak reports for the respective lines are gone with this fix. Change-Id: Ia7407cb20ae9e4ccc2e1cf48c88877c2f87352e1
Diffstat (limited to 'Swift/QtUI/UserSearch/QtContactListWidget.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtContactListWidget.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swift/QtUI/UserSearch/QtContactListWidget.cpp b/Swift/QtUI/UserSearch/QtContactListWidget.cpp
index 1069678..9b76aba 100644
--- a/Swift/QtUI/UserSearch/QtContactListWidget.cpp
+++ b/Swift/QtUI/UserSearch/QtContactListWidget.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -59,6 +59,7 @@ QtContactListWidget::QtContactListWidget(QWidget* parent, SettingsProvider* sett
QtContactListWidget::~QtContactListWidget() {
delete contactListDelegate_;
delete removableItemDelegate_;
+ delete contactListModel_;
}
void QtContactListWidget::setList(const std::vector<Contact::ref>& list) {