摘要:
上图就是android应用程序的一个生命周期,需要明确的一点是,在stoped阶段,没有任何代码执行!通常情况下,不需要实现destroyed的方法来清理系统的垃圾以及其它操作,但是在下列情况时,要实现它: activity includes background threads that you created duringonCreate()or other other long-running resources that could potentially leak memory if not properly closed, you should kill them durin... 阅读全文