File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3335,11 +3335,7 @@ public void exit() {
33353335
33363336 void exit2 () {
33373337 try {
3338- if (activity != null ) {
3339- activity .finishAffinity ();
3340- activity = null ;
3341- }
3342- // System.exit(0);
3338+ System .exit (0 );
33433339 } catch (SecurityException e ) {
33443340 // don't care about applet security exceptions
33453341 }
@@ -3368,6 +3364,12 @@ final public void dispose() {
33683364 // https://github.com/processing/processing-android/issues/213#issuecomment-217348480
33693365 surfaceView .getHolder ().getSurface ().release ();
33703366 surfaceView = null ;
3367+
3368+ // In API level 21 you can do
3369+ // activity.releaseInstance();
3370+ // to ask the app to free up its memory.
3371+
3372+ activity = null ;
33713373 }
33723374
33733375 handleMethods ("dispose" );
You can’t perform that action at this time.
0 commit comments