aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perfprofiler/perfprofilertool.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-01-23 11:17:39 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-01-23 12:12:51 +0000
commit1a3965f0254eba7835404fce7467d2bfc135c31f (patch)
tree37313d79c477da49ee67fc1ded5cd0ca4683695a /src/plugins/perfprofiler/perfprofilertool.h
parent1ec201d4636c0b2a8cdcda8731e628235997bcc0 (diff)
PerfProfiler: Fix memory leak
If the tool view is never shown, the respective widgets have no owner and need to be deleted manually. Change-Id: I6db7113d864607ae233f792363f13cfe841ccd10 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/perfprofiler/perfprofilertool.h')
-rw-r--r--src/plugins/perfprofiler/perfprofilertool.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/perfprofiler/perfprofilertool.h b/src/plugins/perfprofiler/perfprofilertool.h
index cd8c01764c..205b47b8ca 100644
--- a/src/plugins/perfprofiler/perfprofilertool.h
+++ b/src/plugins/perfprofiler/perfprofilertool.h
@@ -49,6 +49,8 @@ class PerfProfilerTool : public QObject
Q_OBJECT
public:
PerfProfilerTool();
+ ~PerfProfilerTool();
+
static PerfProfilerTool *instance();
PerfProfilerTraceManager *traceManager() const;
@@ -115,6 +117,7 @@ private:
QMenu *m_filterMenu = nullptr;
QToolButton *m_aggregateButton = nullptr;
QToolButton *m_tracePointsButton = nullptr;
+ QList<QObject *> m_objectsToDelete;
PerfProfilerTraceView *m_traceView = nullptr;
PerfProfilerStatisticsView *m_statisticsView = nullptr;