TSAGE: Fix memory leak of sound voiceType list
This commit is contained in:
parent
6cab258032
commit
472d2ef9a3
1 changed files with 8 additions and 0 deletions
|
@ -71,6 +71,14 @@ SoundManager::~SoundManager() {
|
||||||
// g_system->getTimerManager()->removeTimerProc(_sfUpdateCallback);
|
// 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;
|
_soundManager = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue