Each app runs in its own process and contains one or more activities.
The Android run time manages these processes and decides which app to kill if it needs resources.
An app’s priority helps determine if the run time will kill it and its running activities.
The app’s priority is influenced by its highest priority activity.
If the Android’s memory manager needs to free up memory, it looks at the activity stack to determine the priority of the activities and which ones can be closed.