diff options
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/PossiblePaths.java | 9 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java index 6b64879..6fb31e9 100644 --- a/core/src/ch/asynk/tankontank/engine/PossiblePaths.java +++ b/core/src/ch/asynk/tankontank/engine/PossiblePaths.java @@ -7,10 +7,11 @@ import java.util.LinkedList; import java.util.HashSet; import java.util.LinkedHashSet; +import com.badlogic.gdx.utils.Disposable; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Vector3; -public class PossiblePaths implements Iterable<Vector3> +public class PossiblePaths implements Disposable, Iterable<Vector3> { private final Board board; @@ -54,6 +55,12 @@ public class PossiblePaths implements Iterable<Vector3> return (to != null); } + @Override + public void dispose() + { + clear(); + } + public void clear() { this.to = null; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 14c68d8..c6da11b 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -143,6 +143,7 @@ public abstract class Map extends Board super.dispose(); clearAll(); destroy.dispose(); + possiblePaths.dispose(); DiceAnimation.free(); PromoteAnimation.free(); FireAnimation.free(); |