We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e70e87 commit 6735cb7Copy full SHA for 6735cb7
1 file changed
jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java
@@ -247,10 +247,19 @@ protected void deinitInThread() {
247
}
248
249
listener.destroy();
250
-
+ // releases the view holder from the Android Input Resources
251
+ // releasing the view enables the context instance to be
252
+ // reclaimed by the GC.
253
+ // if not released; it leads to a weak reference leak
254
+ // disabling the destruction of the Context View Holder.
255
+ androidInput.setView(null);
256
+
257
+ // nullifying the references
258
+ // signals their memory to be reclaimed
259
listener = null;
260
renderer = null;
261
timer = null;
262
+ androidInput = null;
263
264
// do android specific cleaning here
265
logger.fine("Display destroyed.");
0 commit comments