(I searched quite a bit, but there seems no exact answer for this.)
Let's say there's an app. We can push a button to start another activity.
Like this: Activity1 -> Activity2 -> Activity3
If we use the 'back' button, it calls the finish()
, so each activity's onDestroy()
gets called.
But, if we close the app(by pushing the 'overview' button and then swipe the app out),
only the Activity1
's onDestroy()
gets called.
- Why the
onDestroy()
of other activities are not called? - Does it mean that other activities are alive until the system kills them? (If the system has enough resources, they are not destroyed?)