summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-15 23:51:13 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-15 23:51:13 +0200
commitee34fe79fa447e73594e87a13cf35e8b55683c2d (patch)
tree10f119ff7e55c706fadcbb9c5901dfaab88f5fb0 /core/src/ch
parentce63e4632e9528e59ba87cef8ce472cc80c7a964 (diff)
downloadRustAndDust-ee34fe79fa447e73594e87a13cf35e8b55683c2d.zip
RustAndDust-ee34fe79fa447e73594e87a13cf35e8b55683c2d.tar.gz
GameScreen: unload assets on dispose
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/TankOnTank.java2
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java1
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