从内存机器人完成()方法的犯规明显的应用 [英] android finish() method doesnt clear app from memory

查看:102
本文介绍了从内存机器人完成()方法的犯规明显的应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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 :)

这篇关于从内存机器人完成()方法的犯规明显的应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆