随笔分类 -  Android(通用问题)

摘要:public class xxx{ public static UserBean User;} 内存不足会回收闲置资源,全局变量很容易被回收。 解决方法: 不使用全局变量,使用intent来传递数值。 即便目标activity被销毁,intent还在。Oncreate被重新执行,intent值再次取 阅读全文
posted @ 2016-08-25 17:29 mlrs 阅读(703) 评论(0) 推荐(0)