From e6c5e5457bbc5a4cc0b146c40c2b4de1e5ee9fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 18 Feb 2015 12:35:24 +0100 Subject: Map: clear Engagement Pool at dispose --- core/src/ch/asynk/tankontank/game/Engagement.java | 4 ++++ core/src/ch/asynk/tankontank/game/Map.java | 1 + 2 files changed, 5 insertions(+) diff --git a/core/src/ch/asynk/tankontank/game/Engagement.java b/core/src/ch/asynk/tankontank/game/Engagement.java index 4b2edcd..b833c6e 100644 --- a/core/src/ch/asynk/tankontank/game/Engagement.java +++ b/core/src/ch/asynk/tankontank/game/Engagement.java @@ -24,6 +24,10 @@ public class Engagement implements Disposable, Pool.Poolable return e; } + public static void clearPool() + { + engagementPool.clear(); + } public Unit attacker; public Unit defender; diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index a78a4cf..ddcc237 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -115,6 +115,7 @@ public abstract class Map extends Board implements MoveToAnimationCb, ObjectiveS DiceAnimation.free(); PromoteAnimation.free(); FireAnimation.free(); + Engagement.clearPool(); } public void clearAll() -- cgit v1.1-2-g2b99