From 392d46bf8cbd00671af132ef375e4e18c060055c Mon Sep 17 00:00:00 2001 From: morsisko Date: Sun, 30 Aug 2020 20:32:34 +0200 Subject: [PATCH] GUI: Fixed memory leak in CPUDump and SerachListView --- src/gui/Src/BasicView/SearchListView.cpp | 1 + src/gui/Src/Gui/CPUDump.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gui/Src/BasicView/SearchListView.cpp b/src/gui/Src/BasicView/SearchListView.cpp index c4756cf9..1654bfe4 100644 --- a/src/gui/Src/BasicView/SearchListView.cpp +++ b/src/gui/Src/BasicView/SearchListView.cpp @@ -393,5 +393,6 @@ void SearchListView::searchSlot() { FlickerThread* thread = new FlickerThread(mSearchBox, this); connect(thread, SIGNAL(setStyleSheet(QString)), mSearchBox, SLOT(setStyleSheet(QString))); + connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); thread->start(); } diff --git a/src/gui/Src/Gui/CPUDump.cpp b/src/gui/Src/Gui/CPUDump.cpp index 70744d8b..dc66de41 100644 --- a/src/gui/Src/Gui/CPUDump.cpp +++ b/src/gui/Src/Gui/CPUDump.cpp @@ -288,6 +288,7 @@ void CPUDump::setupContextMenu() void CPUDump::getAttention() { BackgroundFlickerThread* thread = new BackgroundFlickerThread(this, mBackgroundColor, this); + connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); thread->start(); }