diff options
Diffstat (limited to 'engines/pink/objects/walk')
-rw-r--r-- | engines/pink/objects/walk/walk_mgr.cpp | 6 | ||||
-rw-r--r-- | engines/pink/objects/walk/walk_mgr.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/engines/pink/objects/walk/walk_mgr.cpp b/engines/pink/objects/walk/walk_mgr.cpp index c7c06ec474..1336991aba 100644 --- a/engines/pink/objects/walk/walk_mgr.cpp +++ b/engines/pink/objects/walk/walk_mgr.cpp @@ -32,6 +32,12 @@ namespace Pink { WalkMgr::WalkMgr() : _isWalking(false), _leadActor(nullptr) {} +WalkMgr::~WalkMgr() { + for (uint i = 0; i < _locations.size(); ++i) { + delete _locations[i]; + } +} + void WalkMgr::deserialize(Pink::Archive &archive) { _leadActor = static_cast<LeadActor *>(archive.readObject()); _locations.deserialize(archive); diff --git a/engines/pink/objects/walk/walk_mgr.h b/engines/pink/objects/walk/walk_mgr.h index cb6b68c31c..a836bfc522 100644 --- a/engines/pink/objects/walk/walk_mgr.h +++ b/engines/pink/objects/walk/walk_mgr.h @@ -42,6 +42,7 @@ struct Coordinates { class WalkMgr : public Object { public: WalkMgr(); + ~WalkMgr() override; virtual void deserialize(Archive &archive); void toConsole() override; |