From e3d18cddb5edbfef6966da490b11ece55cbd2d2d Mon Sep 17 00:00:00 2001 From: crykn Date: Tue, 23 Jan 2024 19:44:20 +0100 Subject: [PATCH] docs: Improve the documentation of a few methods. --- src/main/java/de/eskalon/commons/core/ManagedGame.java | 9 +++++++++ .../java/de/eskalon/commons/screen/ScreenManager.java | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/eskalon/commons/core/ManagedGame.java b/src/main/java/de/eskalon/commons/core/ManagedGame.java index 4d074b5..13b7d26 100644 --- a/src/main/java/de/eskalon/commons/core/ManagedGame.java +++ b/src/main/java/de/eskalon/commons/core/ManagedGame.java @@ -114,6 +114,15 @@ public ScreenManager getScreenManager() { return screenManager; } + /** + * {@inheritDoc} + *

+ * Please note that, on Android, data stored in static variables may persist + * past this stage and thus may still be accessible when the application is + * run again. To prevent this, make sure to set all static variables to + * {@code null} upon disposal of the application + * + */ @Override public void dispose() { screenManager.dispose(); diff --git a/src/main/java/de/eskalon/commons/screen/ScreenManager.java b/src/main/java/de/eskalon/commons/screen/ScreenManager.java index 6a12686..9f76532 100644 --- a/src/main/java/de/eskalon/commons/screen/ScreenManager.java +++ b/src/main/java/de/eskalon/commons/screen/ScreenManager.java @@ -351,6 +351,7 @@ protected void finalizeTransition(T oldTransition) { /** * @see ManagedScreen#resize(int, int) + * @see ScreenTransition#resize(int, int) */ public void resize(int width, int height) { Preconditions.checkState(initialized, @@ -401,9 +402,12 @@ public void resume() { } /** - * Disposes the screen manager and any screen and transitions pushed, which - * were not yet {@linkplain ManagedScreen#hide() hidden}, regardless of - * whether they already started being rendered. + * Disposes the screen manager as well as any screens and transitions, which + * were pushed but not yet {@linkplain ManagedScreen#hide() hidden}, + * regardless of whether they already started being rendered. + * + * @see ManagedScreen#dispose() + * @see ScreenTransition#dispose() */ @Override public void dispose() {