aboutsummaryrefslogtreecommitdiff
path: root/core/qmpmidiplay.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-20 23:29:39 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-20 23:29:39 +0800
commit32568af90e5c521c68432a7e77b6dd8bf524adde (patch)
treee2bed775bf9953f26ad94531da2a20ec9f967482 /core/qmpmidiplay.hpp
parentb68f60e023175b144664de092c31416fa5b58880 (diff)
downloadQMidiPlayer-32568af90e5c521c68432a7e77b6dd8bf524adde.tar.xz
UI refinements and fix to two memory leaks.
Minor improvement in MIDI reading process.
Diffstat (limited to 'core/qmpmidiplay.hpp')
-rw-r--r--core/qmpmidiplay.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/qmpmidiplay.hpp b/core/qmpmidiplay.hpp
index f2d7a4a..9bb6323 100644
--- a/core/qmpmidiplay.hpp
+++ b/core/qmpmidiplay.hpp
@@ -13,6 +13,7 @@ struct SEvent
uint8_t type;
char *str;
SEvent(){time=p1=p2=0;type=0;str=NULL;}
+ ~SEvent(){if(str){delete[] str;str=NULL;}}
SEvent(uint32_t _iid,uint32_t _t,char _tp,uint32_t _p1,uint32_t _p2,const char* s=NULL)
{
iid=_iid;time=_t;type=_tp;
@@ -46,6 +47,7 @@ class CMidiFile
void trackChunkReader();
void headerChunkReader();
int chunkReader(int hdrXp);
+ void dumpEvents();
public:
CMidiFile(const char* fn);
~CMidiFile();