[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [zanshin] src/presentation: What about not leaking memory?
From: Kevin Ottens <ervin () kde ! org>
Date: 2014-07-31 19:45:03
Message-ID: E1XCwHf-0007Xx-R1 () scm ! kde ! org
[Download RAW message or body]
Git commit 687e91eb426f2237c087c2961877c0c222ec3aaf by Kevin Ottens.
Committed on 31/07/2014 at 17:32.
Pushed by ervin into branch 'master'.
What about not leaking memory?
M +8 -1 src/presentation/applicationmodel.cpp
http://commits.kde.org/zanshin/687e91eb426f2237c087c2961877c0c222ec3aaf
diff --git a/src/presentation/applicationmodel.cpp b/src/presentation/applicationmodel.cpp
index b9ada7f..d64cc7f 100644
--- a/src/presentation/applicationmodel.cpp
+++ b/src/presentation/applicationmodel.cpp
@@ -76,6 +76,13 @@ ApplicationModel::ApplicationModel(Domain::ArtifactQueries *artifactQueries,
ApplicationModel::~ApplicationModel()
{
+ if (m_ownInterface) {
+ delete m_artifactQueries;
+ delete m_sourceQueries;
+ delete m_taskQueries;
+ delete m_taskRepository;
+ delete m_noteRepository;
+ }
}
QAbstractItemModel *ApplicationModel::noteSourcesModel()
@@ -154,7 +161,7 @@ QObject *ApplicationModel::currentPage()
{
if (!m_currentPage) {
m_currentPage = new InboxPageModel(m_artifactQueries, m_taskQueries,
- m_taskRepository, m_noteRepository);
+ m_taskRepository, m_noteRepository, this);
}
return m_currentPage;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic