File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
jme3-android/src/main/java/com/jme3/system/android Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -247,10 +247,19 @@ protected void deinitInThread() {
247
247
}
248
248
249
249
listener .destroy ();
250
-
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
251
259
listener = null ;
252
260
renderer = null ;
253
261
timer = null ;
262
+ androidInput = null ;
254
263
255
264
// do android specific cleaning here
256
265
logger .fine ("Display destroyed." );
You can’t perform that action at this time.
0 commit comments