TSAGE: Fix memory leak of sound voiceType list

This commit is contained in:
Paul Gilbert 2011-08-20 21:30:03 +10:00
parent 6cab258032
commit 472d2ef9a3

View file

@ -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;
}