Skip to content

Commit 5aded17

Browse files
committed
put back system.exit()
1 parent c5e1bfb commit 5aded17

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

core/src/processing/core/PApplet.java

+7-5
Original file line numberDiff line numberDiff 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");

0 commit comments

Comments
 (0)