aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/sound/soundcmd.cpp3
-rw-r--r--engines/sci/sound/soundcmd.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index a28b330552..51c0006747 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -206,6 +206,9 @@ SoundCommandParser::SoundCommandParser(ResourceManager *resMan, SegManager *segM
}
SoundCommandParser::~SoundCommandParser() {
+ for (SoundCommandContainer::iterator i = _soundCommands.begin(); i != _soundCommands.end(); ++i)
+ delete *i;
+
delete _music;
}
diff --git a/engines/sci/sound/soundcmd.h b/engines/sci/sound/soundcmd.h
index 94e0698523..7c1995e8d4 100644
--- a/engines/sci/sound/soundcmd.h
+++ b/engines/sci/sound/soundcmd.h
@@ -77,7 +77,8 @@ public:
#endif
private:
- Common::Array<MusicEntryCommand*> _soundCommands;
+ typedef Common::Array<MusicEntryCommand *> SoundCommandContainer;
+ SoundCommandContainer _soundCommands;
ResourceManager *_resMan;
SegManager *_segMan;
#ifdef USE_OLD_MUSIC_FUNCTIONS