Skip to content

Commit

Permalink
JmeSurfaceView: fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
pavly-gerges committed May 21, 2023
1 parent 786c304 commit fc22423
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ public void destroy() {
onRendererCompleted = null;
onExceptionThrown = null;
onLayoutDrawn = null;
/*nullifying the static memory (pushing zero to registers to prepare for a clean use)*/
/*nullifying the static memory*/
JmeAndroidSystem.setView(null);
GameState.setLegacyApplication(null);
GameState.setFirstUpdatePassed(false);
jmeSurfaceViewLogger.log(Level.INFO, "Context and Game have been destructed");
Expand Down

0 comments on commit fc22423

Please sign in to comment.