From 6cf83caf1d211710fd632647146c067caef4269a Mon Sep 17 00:00:00 2001 From: Fabian Eichhorn Date: Wed, 12 Jun 2013 16:43:19 +0200 Subject: [PATCH] AnodeActivity: added removeInstance call to __stateChanged; Since AnodeActivity call addInstance directly, when starting an isolate, it should also remove them, when they stop. --- app/src/org/meshpoint/anode/AnodeActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/org/meshpoint/anode/AnodeActivity.java b/app/src/org/meshpoint/anode/AnodeActivity.java index 4f85b93..400200c 100644 --- a/app/src/org/meshpoint/anode/AnodeActivity.java +++ b/app/src/org/meshpoint/anode/AnodeActivity.java @@ -151,6 +151,9 @@ private void __stateChanged(final int state) { stopButton.setEnabled(state == Runtime.STATE_STARTED); /* exit the activity if the runtime has exited */ if(state == Runtime.STATE_STOPPED) { + AnodeService.removeInstance(instance); + isolate.removeStateListener(this); + isolate = null; finish(); } }