diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 6e1da8d..6e460db 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -95,6 +95,7 @@ void MainWindow::RemoveThread(TextThread* thread) ttCombo->setCurrentIndex(0); on_ttCombo_activated(0); } + delete thread; } void MainWindow::ThreadOutput(TextThread* thread, QString output) diff --git a/texthook/host.cc b/texthook/host.cc index 2b5627f..6c6ca8e 100644 --- a/texthook/host.cc +++ b/texthook/host.cc @@ -235,7 +235,7 @@ void RemoveThreads(bool(*RemoveIf)(ThreadParameter, ThreadParameter), ThreadPara { if (onRemove) onRemove(i.second); //delete i.second; // Artikash 7/24/2018: FIXME: Qt GUI updates on another thread, so I can't delete this yet. - i.second->Clear(); // Temp workaround to free some memory. + //i.second->Clear(); // Temp workaround to free some memory. removedThreads.push_back(i.first); } for (auto i : removedThreads) textThreadsByParams.erase(i);