SAGA2: Fix various cleanup steps

This commit is contained in:
a/ 2021-08-21 01:21:47 +09:00
parent 89b5a59ed0
commit 21316cc286
3 changed files with 2 additions and 5 deletions

View File

@ -152,7 +152,7 @@ void cleanupMagic(void) {
for (int i = 0; i < maxSpells; i++) {
spellBook[i].killEffects();
}
delete spellBook;
delete[] spellBook;
g_vm->_sdpList->cleanup();
g_vm->_edpList->cleanup();

View File

@ -174,7 +174,7 @@ void SpellDisplayPrototypeList::cleanup(void) {
delete spells[i];
spells[i] = nullptr;
}
delete spells;
delete[] spells;
spells = nullptr;
maxCount = 0;
}

View File

@ -1503,9 +1503,6 @@ void cleanupMaps(void) {
// Dump all of the tile terrain banks
for (i = 0; i < maxBanks; i++) {
if (tileBanks[i] != nullptr) {
if (tileBanks[i]->_tileArray != nullptr)
delete[] tileBanks[i]->_tileArray;
delete tileBanks[i];
tileBanks[i] = nullptr;
}