From 5963a540ef161e804f756d54970b2c7cb55fcc00 Mon Sep 17 00:00:00 2001 From: uruk Date: Thu, 17 Jul 2014 17:33:04 +0200 Subject: CGE2: Add destructor to Hero(). Hopefully it will cut short the leak problems with _dim[]. --- engines/cge2/hero.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/cge2/hero.cpp') 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; -- cgit v1.2.3