diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-16 12:55:42 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-16 12:55:42 +0100 |
commit | 7b8fb6e6b560be6f01b8c6c6c203f53cbbd228fe (patch) | |
tree | 33add4f65149fd076c2255e56e5c215bbf4d7b46 /core/src | |
parent | 47bcd4d0a06f5b41e021a083ad779a1f24263546 (diff) | |
download | RustAndDust-7b8fb6e6b560be6f01b8c6c6c203f53cbbd228fe.zip RustAndDust-7b8fb6e6b560be6f01b8c6c6c203f53cbbd228fe.tar.gz |
PossiblePath: is Disposable
Diffstat (limited to 'core/src')
-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(); |