From e8b3a539b4d7a300f076aaec7411112ec877f7dd Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 1 Aug 2019 11:09:41 +0200 Subject: ProcessManager: Fix timer leak in ProcessStacksWidget CObjects should really be reference-counted instead of this error-prone (but convenient) model. Found by PVS-Studio. --- Applications/ProcessManager/ProcessStacksWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Applications') diff --git a/Applications/ProcessManager/ProcessStacksWidget.cpp b/Applications/ProcessManager/ProcessStacksWidget.cpp index 4ebc0f09f8..d7e4a822da 100644 --- a/Applications/ProcessManager/ProcessStacksWidget.cpp +++ b/Applications/ProcessManager/ProcessStacksWidget.cpp @@ -11,7 +11,7 @@ ProcessStacksWidget::ProcessStacksWidget(GWidget* parent) m_stacks_editor = new GTextEditor(GTextEditor::Type::MultiLine, this); m_stacks_editor->set_readonly(true); - m_timer = new CTimer(1000, [this] { refresh(); }); + m_timer = new CTimer(1000, [this] { refresh(); }, this); } ProcessStacksWidget::~ProcessStacksWidget() -- cgit v1.2.3