Skip to content

Commit

Permalink
docs: Improve the documentation of a few methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
crykn committed Jan 23, 2024
1 parent 893fa39 commit e3d18cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/main/java/de/eskalon/commons/core/ManagedGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ public ScreenManager<S, T> getScreenManager() {
return screenManager;
}

/**
* {@inheritDoc}
* <p>
* 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();
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/de/eskalon/commons/screen/ScreenManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit e3d18cd

Please sign in to comment.