diff --git a/qt/src/Displayer.cc b/qt/src/Displayer.cc index d2b4366e..ea6046cf 100644 --- a/qt/src/Displayer.cc +++ b/qt/src/Displayer.cc @@ -126,6 +126,7 @@ bool Displayer::setSources(QList sources) { m_renderTimer.stop(); if(m_imageItem) { m_scene->removeItem(m_imageItem); + delete m_imageItem; } m_currentSource = nullptr; qDeleteAll(m_sourceRenderers); diff --git a/qt/src/RecognitionMenu.cc b/qt/src/RecognitionMenu.cc index 1eb9677f..671690c8 100644 --- a/qt/src/RecognitionMenu.cc +++ b/qt/src/RecognitionMenu.cc @@ -170,7 +170,7 @@ void RecognitionMenu::rebuild() { // Add PSM items addSeparator(); - QMenu* psmMenu = new QMenu(); + QMenu* psmMenu = new QMenu(this); int activePsm = ConfigSettings::get>("psm")->getValue(); struct PsmEntry {