summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine/Move.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-02-18 12:34:16 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-02-18 12:34:16 +0100
commitde7a33881b3f20cf29a36175831409411ff8fe56 (patch)
tree65b1c106f7ef977428d442949289bdd39ba9687a /core/src/ch/asynk/tankontank/engine/Move.java
parent30a2d67036412ecb5f3ba08ef6fcaeebc7b346af (diff)
downloadRustAndDust-de7a33881b3f20cf29a36175831409411ff8fe56.zip
RustAndDust-de7a33881b3f20cf29a36175831409411ff8fe56.tar.gz
Board: clear Move and Path Pool at dispose
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine/Move.java')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Move.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Move.java b/core/src/ch/asynk/tankontank/engine/Move.java
index 16a0860..2f0c138 100644
--- a/core/src/ch/asynk/tankontank/engine/Move.java
+++ b/core/src/ch/asynk/tankontank/engine/Move.java
@@ -15,7 +15,8 @@ public class Move extends Path implements Iterable<Vector3>
EXIT;
}
- private static final Pool<Move> movePool = new Pool<Move>() {
+ private static final Pool<Move> movePool = new Pool<Move>()
+ {
@Override
protected Move newObject() {
return new Move();
@@ -42,6 +43,11 @@ public class Move extends Path implements Iterable<Vector3>
return m;
}
+ public static void clearPool()
+ {
+ movePool.clear();
+ }
+
public static Move getEnter(Pawn pawn, Tile to, Orientation orientation)
{
Move m = get(pawn, null, to, orientation, null);