From ad5756fa31113b88fb486c679adfe2197daeca08 Mon Sep 17 00:00:00 2001 From: richiesams Date: Tue, 20 Aug 2013 20:48:34 -0500 Subject: ZVISION: Add a destructor to Puzzle --- engines/zvision/puzzle.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engines/zvision/puzzle.h b/engines/zvision/puzzle.h index 227183ab02..371af83d91 100644 --- a/engines/zvision/puzzle.h +++ b/engines/zvision/puzzle.h @@ -27,11 +27,17 @@ #include "common/list.h" #include "common/ptr.h" -namespace ZVision { +#include "zvision/actions.h" -class ResultAction; +namespace ZVision { struct Puzzle { + ~Puzzle() { + for (Common::List::iterator iter = resultActions.begin(); iter != resultActions.end(); iter++) { + delete (*iter); + } + } + /** How criteria should be decided */ enum CriteriaOperator { EQUAL_TO, -- cgit v1.2.3