导航

2010年6月12日

摘要: And I’m back! Reporting live on the glorious adventures in the exciting world of Android. This blog post is the second one in the Android series. This time with code samples! Yeah!In my first bl... 阅读全文

posted @ 2010-06-12 11:28 Enrico Zhang 阅读(1276) 评论(0) 推荐(0) 编辑

摘要: 1.对象的强、软、弱和虚引用 在JDK 1.2以前的版本中,若一个对象不被任何变量引用,那么程序就无法再使用这个对象。也就是说,只有对象处于可触及(reachable)状态,程序才能使用它。从JDK 1.2版本开始,把对象的引用分为4种级别,从而使程序能更加灵活地控制对象的生命周期。这4种级别由高到低依次为:强引用、软引用、弱引用和虚引用。图1为对象应用类层次。图1⑴强引用(StrongRefer... 阅读全文

posted @ 2010-06-12 10:44 Enrico Zhang 阅读(515) 评论(0) 推荐(0) 编辑