任务杀手杀死一个应用程序和Android操作系统杀死一个应用程序的区别

时间:2022-05-31 02:17:13

Is there any difference between what happens when you use a Task Killer App to kill an app vs. what happens when the Android OS kills an app due to scarce resources?

当你使用一个任务杀手应用程序来杀死一个应用程序时,与Android操作系统由于资源稀缺而杀死一个应用程序时,会发生什么有什么区别吗?

The Android SDK says that the Application.onTerminate() method isn't called when the OS kills an app due to scarce resources. So it sounds like the OS doesn't cleanly close apps and that it does exactly what the much-debated task killers do.

Android SDK表示,由于资源稀缺,当操作系统杀死一个应用程序时,不会调用Application.onTerminate()方法。因此,听起来操作系统并不是完全关闭应用程序,它所做的正是备受争议的任务杀手所做的。

If they do the same thing, then task killers don't do any more harm than the OS itself, right?

如果他们做同样的事情,那么任务杀手不会比操作系统本身更有害,对吧?

3 个解决方案

#1


6  

As of Froyo there is no difference. :) All a task killer can do is kill -9 a process when it is in the background, which is the same thing the OS does when it wants its memory. And yes, this is not a clean and orderly exit, it is a kill-the-process-dead-right-now. In fact on regular Android environments, Application.onTerminate() will never be killed; processes only go away by killing.

对于弗罗约来说没有区别。:)任务杀手所能做的就是在后台杀死进程-9,这和操作系统需要内存时的做法是一样的。是的,这不是一个干净、有序的退出,而是一个“一刀两断”的过程。实际上,在常规的Android环境中,Application.onTerminate()永远不会被杀死;进程只会通过杀戮而消失。

Prior to Froyo task killers had access to a different API -- "force stop" -- that allowed them to much more brutally stop all apps. This includes stopping any started services, removing any alarms that are registered, removing notifications, etc.

在Froyo任务杀手之前,他们可以访问一个不同的API——“force stop”——让他们更残忍地停止所有应用。这包括停止任何已启动的服务、删除注册的警报、删除通知等。

#2


3  

Is there any difference between what happens when you use a Task Killer App to kill an app vs. what happens when the Android OS kills an app due to scarce resources?

当你使用一个任务杀手应用程序来杀死一个应用程序时,与Android操作系统由于资源稀缺而杀死一个应用程序时,会发生什么有什么区别吗?

A task killer nukes the app from orbit. It terminates the process, removes all alarms, removes all registered PendingIntents (e.g., for location updates), etc.

一个任务杀手从轨道上用核弹攻击这个应用。它终止进程,删除所有警报,删除所有已注册的PendingIntents(例如,用于位置更新),等等。

On the infrequent occasion where Android needs to terminate a process to free up RAM, it just terminates the process.

在Android需要终止进程以释放RAM的罕见情况下,它只是终止进程。

If they do the same thing, then task killers don't do any more harm than the OS itself, right?

如果他们做同样的事情,那么任务杀手不会比操作系统本身更有害,对吧?

No, task killers do a fair bit more harm to the app.

不,任务杀手对应用程序的伤害更大。

#3


0  

AFAIK by experience, when Android kills an application you can't count on it being killed cleanly (no calls to destroy methods). As for a task killer... well, I guess it depends on how a specific task killer is implemented.

根据经验,当Android杀死一个应用程序时,你不能指望它会被干净利落地杀死(不需要破坏方法)。至于任务杀手……我想这取决于如何实现一个特定的任务杀手。

Android does a great job managing resources on it's own, but a task killer can come in handy when you explicitly want to kill something. And to answer your question, I don't think a task killer does any more harm than when Android kills an application.

Android能够独立地管理资源,但是当你明确地想要杀死什么东西时,任务杀手就派上用场了。为了回答你的问题,我不认为一个任务杀手比Android杀死一个应用程序更有害。

#1


6  

As of Froyo there is no difference. :) All a task killer can do is kill -9 a process when it is in the background, which is the same thing the OS does when it wants its memory. And yes, this is not a clean and orderly exit, it is a kill-the-process-dead-right-now. In fact on regular Android environments, Application.onTerminate() will never be killed; processes only go away by killing.

对于弗罗约来说没有区别。:)任务杀手所能做的就是在后台杀死进程-9,这和操作系统需要内存时的做法是一样的。是的,这不是一个干净、有序的退出,而是一个“一刀两断”的过程。实际上,在常规的Android环境中,Application.onTerminate()永远不会被杀死;进程只会通过杀戮而消失。

Prior to Froyo task killers had access to a different API -- "force stop" -- that allowed them to much more brutally stop all apps. This includes stopping any started services, removing any alarms that are registered, removing notifications, etc.

在Froyo任务杀手之前,他们可以访问一个不同的API——“force stop”——让他们更残忍地停止所有应用。这包括停止任何已启动的服务、删除注册的警报、删除通知等。

#2


3  

Is there any difference between what happens when you use a Task Killer App to kill an app vs. what happens when the Android OS kills an app due to scarce resources?

当你使用一个任务杀手应用程序来杀死一个应用程序时,与Android操作系统由于资源稀缺而杀死一个应用程序时,会发生什么有什么区别吗?

A task killer nukes the app from orbit. It terminates the process, removes all alarms, removes all registered PendingIntents (e.g., for location updates), etc.

一个任务杀手从轨道上用核弹攻击这个应用。它终止进程,删除所有警报,删除所有已注册的PendingIntents(例如,用于位置更新),等等。

On the infrequent occasion where Android needs to terminate a process to free up RAM, it just terminates the process.

在Android需要终止进程以释放RAM的罕见情况下,它只是终止进程。

If they do the same thing, then task killers don't do any more harm than the OS itself, right?

如果他们做同样的事情,那么任务杀手不会比操作系统本身更有害,对吧?

No, task killers do a fair bit more harm to the app.

不,任务杀手对应用程序的伤害更大。

#3


0  

AFAIK by experience, when Android kills an application you can't count on it being killed cleanly (no calls to destroy methods). As for a task killer... well, I guess it depends on how a specific task killer is implemented.

根据经验,当Android杀死一个应用程序时,你不能指望它会被干净利落地杀死(不需要破坏方法)。至于任务杀手……我想这取决于如何实现一个特定的任务杀手。

Android does a great job managing resources on it's own, but a task killer can come in handy when you explicitly want to kill something. And to answer your question, I don't think a task killer does any more harm than when Android kills an application.

Android能够独立地管理资源,但是当你明确地想要杀死什么东西时,任务杀手就派上用场了。为了回答你的问题,我不认为一个任务杀手比Android杀死一个应用程序更有害。