From cb89c0ecf3967c6787016157322a507662f0d652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 16 Oct 2014 15:46:49 +0200 Subject: TankOnTank,GameScreen: clean up dispose calls --- core/src/ch/asynk/tankontank/TankOnTank.java | 3 ++- core/src/ch/asynk/tankontank/screens/GameScreen.java | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/ch/asynk/tankontank/TankOnTank.java b/core/src/ch/asynk/tankontank/TankOnTank.java index ec22fcb..a58d7dc 100644 --- a/core/src/ch/asynk/tankontank/TankOnTank.java +++ b/core/src/ch/asynk/tankontank/TankOnTank.java @@ -77,8 +77,9 @@ public class TankOnTank extends Game public void dispose() { Gdx.app.debug("TankOnTank", "dispose()"); - factory.dispose(); getScreen().dispose(); + factory.dispose(); + unloadAssets(); } // @Override diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index b778e78..b8ba533 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -232,11 +232,10 @@ public class GameScreen implements Screen public void dispose() { // Gdx.app.debug("GameScreen", "dispose()"); - game.unloadAssets(); mapBatch.dispose(); hudBatch.dispose(); - if (DEBUG) debugShapes.dispose(); ctrl.dispose(); + if (DEBUG) debugShapes.dispose(); } @Override -- cgit v1.1-2-g2b99