From kde-commits Thu Jul 31 19:45:03 2014 From: Kevin Ottens Date: Thu, 31 Jul 2014 19:45:03 +0000 To: kde-commits Subject: [zanshin] src/presentation: What about not leaking memory? Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=140683591915853 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/appli= cationmodel.cpp index b9ada7f..d64cc7f 100644 --- a/src/presentation/applicationmodel.cpp +++ b/src/presentation/applicationmodel.cpp @@ -76,6 +76,13 @@ ApplicationModel::ApplicationModel(Domain::ArtifactQueri= es *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 =3D new InboxPageModel(m_artifactQueries, m_taskQuer= ies, - m_taskRepository, m_noteReposit= ory); + m_taskRepository, m_noteReposit= ory, this); } = return m_currentPage;