First, the andorid kernel is Linux, and the IOS kernel is Unix. The thread destruction is determined by the system.
Android process has five levels:
1. Foreground process (foreground process)
Foreground has the highest priority.
A is in activity resume () Status
B is in the status of interacting with the Bound Service
C is in the frontend status of the Service, (startforeground () is called)
The D service lifecycle function is being executed (oncreate (), onstart (), ondestroy ())
E broadcastreceiver is executing the onreceive () method
Killing foreground process requires a user response because the security priority is the highest.
2. Visible Process
Activity is not displayed on the foreground, but is not hidden. You can see it. For example, a dialog box (input method) is displayed)
The service of a bound activity to visible or foreground, or an input method.
3. Service Process
A running service that is not in the preceding two statuses
4. Background Process
Activity process in the invisible state, onstop () is called
5. Empty Process
No components process is running, and the process is retained mainly for caching purposes.