Chrisの梳羽之礁

A look of quick intelligence and soft refinement
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年6月5日

摘要: 原文:Context引发的内存泄漏在android中context可以作很多操作,但是最主要的功能是加载和访问资源。在android中有两种context,一种是 application context,一种是activity context,通常我们在各种类和方法间传递的是activity context。比如一个activity的onCreate:protected void onCreate(Bundle state) { super.onCreate(state); TextView label = new TextView(this); //传... 阅读全文

posted @ 2012-06-05 11:20 Chrisfang6 阅读(240) 评论(0) 推荐(0) 编辑

摘要: 原文:AndroidApplication(Java部分)启动过程调用 ActivityThread.main() ,具体过程如下:1, 如果支持 Dalvik 的 sampling profiler, 则绑定本线程族到SamplingProfiler 实例,并启动;2, 为 native 进程进行更新参数 ArgV0;3, 准备主 Looper:创建一个新的 Looper 实例,并关联到ActivityThread 的静态 sThreadLocal, 和 Looper 的静态 mMainLooper;4, 创建 Handler 实例sMainThreadHandler。问题:1, 什么是 s 阅读全文

posted @ 2012-06-05 11:15 Chrisfang6 阅读(1123) 评论(0) 推荐(0) 编辑