简体   繁体   English

当 Android 杀死您应用的进程时,它是否包括属于该应用的所有进程?

[英]When Android kills your app's process, does it include all the processes belonging to the app?

It is well known that can Android can kill the app's process at any time (mostly only when the app is in the background).众所周知,can Android 可以随时终止应用程序的进程(大多数情况下仅当应用程序处于后台时)。

What about running Services that are running in a separate process with the android:process XML tag?运行在带有android:process XML 标签的单独进程中的服务怎么样? Could the system remove only one of the processes or are they always both killed at the same time?系统只能删除其中一个进程还是它们总是同时被杀死?

When Android kills an app's process, it will typically kill the entire app and all the processes belonging to it.当 Android 终止一个应用程序的进程时,它通常会终止整个应用程序以及属于它的所有进程。 This is done to free up system resources and improve overall device performance.这样做是为了释放系统资源并提高整体设备性能。 However, there may be some cases where only a portion of the app's processes are killed, depending on the specific circumstances.但也有可能只有部分应用进程被kill掉,具体情况视具体情况而定。 For example, if the app is running in the background and is not actively being used, Android may choose to kill only some of its processes.例如,如果应用程序在后台运行并且未被主动使用,则 Android 可能会选择仅终止其部分进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM