diff options
-rw-r--r-- | scumm/scumm.cpp | 3 | ||||
-rw-r--r-- | scumm/sound.cpp | 3 | ||||
-rw-r--r-- | scumm/sprite_he.cpp | 6 | ||||
-rw-r--r-- | scumm/sprite_he.h | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 973bb03615..89275cf53e 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1670,6 +1670,9 @@ ScummEngine_v90he::~ScummEngine_v90he() { if (_heversion >= 98) { delete _logicHE; } + if (_heversion >= 99) { + free(_hePalettes); + } } #endif diff --git a/scumm/sound.cpp b/scumm/sound.cpp index df45982ec5..bcccb6c6c6 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -88,6 +88,9 @@ Sound::Sound(ScummEngine *parent) Sound::~Sound() { stopCDTimer(); delete _sfxFile; + + // HE Specific + free(_heMusic); } void Sound::addSoundToQueue(int sound, int heOffset, int heChannel, int heFlags) { diff --git a/scumm/sprite_he.cpp b/scumm/sprite_he.cpp index 923c7556c4..2057c34b35 100644 --- a/scumm/sprite_he.cpp +++ b/scumm/sprite_he.cpp @@ -36,6 +36,12 @@ namespace Scumm { Sprite::Sprite(ScummEngine_v90he *vm) : _vm(vm) { } +Sprite::~Sprite() { + free(_spriteGroups); + free(_spriteTable); + free(_activeSpritesTable); +} + void ScummEngine_v90he::allocateArrays() { ScummEngine::allocateArrays(); _sprite->allocTables(_numSprites, MAX(64, _numSprites / 4), 64); diff --git a/scumm/sprite_he.h b/scumm/sprite_he.h index 848c3604b4..6cc1db7562 100644 --- a/scumm/sprite_he.h +++ b/scumm/sprite_he.h @@ -102,6 +102,7 @@ class ScummEngine_v90he; class Sprite { public: Sprite(ScummEngine_v90he *vm); + virtual ~Sprite(); SpriteInfo *_spriteTable; SpriteGroup *_spriteGroups; |