diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-15 23:51:13 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-09-15 23:51:13 +0200 |
commit | ee34fe79fa447e73594e87a13cf35e8b55683c2d (patch) | |
tree | 10f119ff7e55c706fadcbb9c5901dfaab88f5fb0 | |
parent | ce63e4632e9528e59ba87cef8ce472cc80c7a964 (diff) | |
download | RustAndDust-ee34fe79fa447e73594e87a13cf35e8b55683c2d.zip RustAndDust-ee34fe79fa447e73594e87a13cf35e8b55683c2d.tar.gz |
GameScreen: unload assets on dispose
-rw-r--r-- | core/src/ch/asynk/tankontank/TankOnTank.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/screens/GameScreen.java | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/TankOnTank.java b/core/src/ch/asynk/tankontank/TankOnTank.java index 8083534..9373acb 100644 --- a/core/src/ch/asynk/tankontank/TankOnTank.java +++ b/core/src/ch/asynk/tankontank/TankOnTank.java @@ -44,6 +44,7 @@ public class TankOnTank extends Game public void unloadAssets() { Gdx.app.debug("TankOnTank", "unload assets : " + (Gdx.app.getJavaHeap()/1024.0f) + "KB"); + Gdx.app.debug("TankOnTank", "diagnostics:\n" + manager.getDiagnostics() ); manager.unload("images/map_a.png"); manager.unload("images/map_b.png"); manager.unload("images/dice.pack"); @@ -53,6 +54,7 @@ public class TankOnTank extends Game manager.unload("images/hex.png"); // manager.unload("images/cup.jpg"); // manager.unload("images/small.png"); + Gdx.app.debug("TankOnTank", "diagnostics:\n" + manager.getDiagnostics() ); } diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index 97e0089..6e0a2e0 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -222,6 +222,7 @@ public class GameScreen extends AbstractScreen hud.dispose(); gameStage.dispose(); UnitFactory.dispose(); + game.unloadAssets(); } @Override |