File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3335,11 +3335,7 @@ public void exit() {
3335
3335
3336
3336
void exit2 () {
3337
3337
try {
3338
- if (activity != null ) {
3339
- activity .finishAffinity ();
3340
- activity = null ;
3341
- }
3342
- // System.exit(0);
3338
+ System .exit (0 );
3343
3339
} catch (SecurityException e ) {
3344
3340
// don't care about applet security exceptions
3345
3341
}
@@ -3368,6 +3364,12 @@ final public void dispose() {
3368
3364
// https://github.com/processing/processing-android/issues/213#issuecomment-217348480
3369
3365
surfaceView .getHolder ().getSurface ().release ();
3370
3366
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 ;
3371
3373
}
3372
3374
3373
3375
handleMethods ("dispose" );
You can’t perform that action at this time.
0 commit comments