Permalink
Browse files

stop all actors when the activity is stopped

  • Loading branch information...
1 parent 8cdc76a commit 2348ef428ef69a5540a0387eab471aec73fb72d4 @gseitz committed Feb 24, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/main/scala/Activity.scala
@@ -29,7 +29,7 @@ case class Hakker(name: String, activity: MainActivity, left: TypedResource[andr
}
class MainActivity extends Activity {
- override def onCreate(savedInstanceState: Bundle) {
+ override def onCreate(savedInstanceState: Bundle) = {
super.onCreate(savedInstanceState)
setContentView(R.layout.mainlayout)
@@ -51,4 +51,9 @@ class MainActivity extends Activity {
DiningHakkersOnFsm.run(hakkers)
}
+
+ override def onStop = {
+ akka.actor.Actor.registry.shutdownAll
+ super.onStop
+ }
}

0 comments on commit 2348ef4

Please sign in to comment.