diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index 86361956a..b8ad64bab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -556,6 +556,7 @@ public class GameScene extends PixelScene { private synchronized void prompt( String text ) { if (prompt != null) { + prompt.destroy(); prompt.killAndErase(); prompt = null; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java index af149ba49..76c30f551 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toast.java @@ -77,13 +77,6 @@ public class Toast extends Component { PixelScene.align(text); } - @Override - public synchronized void kill() { - super.kill(); - //need to also destroy the text so that memory is freed - text.destroy(); - } - public void text( String txt ) { text.text( txt ); }