diff --git a/fm/src/mainwindow.cpp b/fm/src/mainwindow.cpp index f9e5c84..ccef8f6 100644 --- a/fm/src/mainwindow.cpp +++ b/fm/src/mainwindow.cpp @@ -250,6 +250,16 @@ MainWindow::MainWindow() QTimer::singleShot(0, this, SLOT(lateStart())); } + +MainWindow::~MainWindow() +{ + if (actionList) { + qDeleteAll(*actionList); + actionList->clear(); + delete actionList; + actionList = nullptr; + } +} //--------------------------------------------------------------------------- /** diff --git a/fm/src/mainwindow.h b/fm/src/mainwindow.h index a0bfba0..0dd8d45 100644 --- a/fm/src/mainwindow.h +++ b/fm/src/mainwindow.h @@ -78,6 +78,7 @@ class MainWindow : public QMainWindow public: MainWindow(); + ~MainWindow(); myModel *modelList; protected: