GUI: Fixed memory leak in CPUDump and SerachListView

This commit is contained in:
morsisko 2020-08-30 20:32:34 +02:00 committed by Duncan Ogilvie
parent 982f8735e9
commit 392d46bf8c
2 changed files with 2 additions and 0 deletions

View File

@ -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();
}

View File

@ -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();
}