diff options
author | uruk | 2014-07-17 17:33:04 +0200 |
---|---|---|
committer | uruk | 2014-07-17 17:33:04 +0200 |
commit | 5963a540ef161e804f756d54970b2c7cb55fcc00 (patch) | |
tree | a07538858ad757acf2d11660453549a031c5a432 /engines/cge2 | |
parent | 49cea2d927c4a9a278827e6c4d0877386bb327d2 (diff) | |
download | scummvm-rg350-5963a540ef161e804f756d54970b2c7cb55fcc00.tar.gz scummvm-rg350-5963a540ef161e804f756d54970b2c7cb55fcc00.tar.bz2 scummvm-rg350-5963a540ef161e804f756d54970b2c7cb55fcc00.zip |
CGE2: Add destructor to Hero().
Hopefully it will cut short the leak problems with _dim[].
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/hero.cpp | 4 | ||||
-rw-r--r-- | engines/cge2/hero.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index cebfe73295..c9b8dc5a13 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -40,6 +40,10 @@ Hero::Hero(CGE2Engine *vm) } } +Hero::~Hero() { + contract(); +} + Sprite *Hero::expand() { // It's very similar to Sprite's expand, but doesn't bother with "labels" for example. TODO: Try to unify the two later! if (_ext) return this; diff --git a/engines/cge2/hero.h b/engines/cge2/hero.h index c277b4a780..3b5329e12c 100644 --- a/engines/cge2/hero.h +++ b/engines/cge2/hero.h @@ -75,6 +75,7 @@ public: int _maxDist; bool _ignoreMap; Hero(CGE2Engine *vm); + ~Hero(); void tick(); Sprite *expand(); Sprite *contract(); |