From 32568af90e5c521c68432a7e77b6dd8bf524adde Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 20 Apr 2016 23:29:39 +0800 Subject: UI refinements and fix to two memory leaks. Minor improvement in MIDI reading process. --- core/qmpmidiplay.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/qmpmidiplay.hpp') 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(); -- cgit v1.2.3