diff options
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/surface_list.cpp | 4 | ||||
-rw-r--r-- | engines/teenagent/surface_list.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/engines/teenagent/surface_list.cpp b/engines/teenagent/surface_list.cpp index 481263444b..972c7a4186 100644 --- a/engines/teenagent/surface_list.cpp +++ b/engines/teenagent/surface_list.cpp @@ -30,6 +30,10 @@ namespace TeenAgent { SurfaceList::SurfaceList() : surfaces(NULL), surfaces_n(0) {} +SurfaceList::~SurfaceList() { + free(); +} + void SurfaceList::load(Common::SeekableReadStream *stream, Type type, int sub_hack) { free(); diff --git a/engines/teenagent/surface_list.h b/engines/teenagent/surface_list.h index 289148af6c..23e0ff423a 100644 --- a/engines/teenagent/surface_list.h +++ b/engines/teenagent/surface_list.h @@ -35,6 +35,7 @@ public: enum Type { kTypeOn }; SurfaceList(); + ~SurfaceList(); void load(Common::SeekableReadStream *stream, Type type, int sub_hack = 0); void free(); void render(Graphics::Surface *surface, const Common::Rect & clip) const; |