从内存机器人完成()方法的犯规明显的应用机器人、明显、内存、方法

由网友(我差点就忘记你了)分享简介:我有一个活动,我调用完成()方法和活动是不是从内存中清除。I have an activity and I call the finish() method and the activity is not cleared from memory.在调用完成(),我看到了该方法的onDestroy()成功执行(和我清...

我有一个活动,我调用完成()方法和活动是不是从内存中清除。

I have an activity and I call the finish() method and the activity is not cleared from memory.

在调用完成(),我看到了该方法的onDestroy()成功执行(和我清楚在那里我所有的变量和东西)。

After calling finish() , I see that the method onDestroy() is executed successfully (and I clear all my variables and stuff in there).

如果它从内存中清除或它如何Android的工作?据我了解了活动的生命周期就结束了。

Should it be cleared from memory or its how android works? As I understand the LifeCycle of the Activity is finished.

如果它使应用程序在内存中,因此运行速度更快,用户使用它的第二次,是什么样的对象,我可以在内存中留下重用?如果我理解正确的话,我想以清除的onDestroy一切。

And if it keeps the app in memory so it runs faster the 2nd time the user uses it, what kind of objects can I leave in memory to reuse? If I understand correctly, I am suppose to clear everything on onDestroy.

感谢

丹尼尔

推荐答案

机器人保持过程中的情况下用户想要重新启动该应用周围,这使得启动阶段更快。这一过程将不会做任何事情,如果内存需要被回收,这个过程会被杀死。别担心:)

Android keeps processes around in case the user wants to restart the app, this makes the startup phase faster. The process will not be doing anything and if memory needs to be reclaimed, the process will be killed. Don't worry about it :)

阅读全文

相关推荐

最新文章