diff options
author | Paul Gilbert | 2011-08-20 21:30:03 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-08-20 21:30:03 +1000 |
commit | 472d2ef9a30e43e4c4f1818da0cfa0122f7a9982 (patch) | |
tree | 4956cf1d58019be7a1c7269027683268617c6403 /engines | |
parent | 6cab258032b72054f901d4a19a85ac6ef8ef4513 (diff) | |
download | scummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.tar.gz scummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.tar.bz2 scummvm-rg350-472d2ef9a30e43e4c4f1818da0cfa0122f7a9982.zip |
TSAGE: Fix memory leak of sound voiceType list
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/sound.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/tsage/sound.cpp b/engines/tsage/sound.cpp index 7c8dc83fe9..0b77628801 100644 --- a/engines/tsage/sound.cpp +++ b/engines/tsage/sound.cpp @@ -71,6 +71,14 @@ SoundManager::~SoundManager() { // g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback); } + // Free any allocated voice type structures + for (int idx = 0; idx < SOUND_ARR_SIZE; ++idx) { + if (sfManager()._voiceTypeStructPtrs[idx]) { + delete sfManager()._voiceTypeStructPtrs[idx]; + sfManager()._voiceTypeStructPtrs[idx] = NULL; + } + } + _soundManager = NULL; } |