aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-16 23:51:26 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2017-06-16 23:51:26 +0800
commit64c91c7da66ba71e2bb32077680f234aba4ac65d (patch)
treedc44e44c4f2b1530952f57538d7164f712b61b02 /qmidiplayer-desktop/qmpmainwindow.cpp
parent37ba9dd1ce449bc2c2f422dd04225bc68bd89c59 (diff)
downloadQMidiPlayer-64c91c7da66ba71e2bb32077680f234aba4ac65d.tar.xz
Code refactoring and fix to memory leaks.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index d65d873..d2c2d0d 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -70,6 +70,12 @@ qmpMainWindow::qmpMainWindow(QWidget *parent) :
qmpMainWindow::~qmpMainWindow()
{
+ QList<QAction*>a=ui->lbFileName->actions();
+ for(unsigned i=0;i<a.size();++i)
+ {
+ ui->lbFileName->removeAction(a[i]);
+ delete a[i];
+ }
pmgr->deinitPlugins();
delete pmgr;if(player)delete player;
if(timer)delete timer;
@@ -79,6 +85,9 @@ qmpMainWindow::~qmpMainWindow()
delete plistw;plistw=NULL;
delete infow;infow=NULL;
delete settingsw;settingsw=NULL;
+ delete panicf;panicf=NULL;
+ delete renderf;renderf=NULL;
+ delete reloadsynf;reloadsynf=NULL;
delete ui;
}