2009年9月27日

垃圾回收与强引用,软引用,弱引用,幻引用的关系

摘要: Java 2 平台引入了 java.lang.ref 包,其中包括的类可以让您引用对象,而不将它们留在内存中。这些类还提供了与垃圾收集器(garbage collector)之间有限的交互。Peter Haggar 在本文中分析了 SoftReference、WeakReference 和 PhantomReference 类的功能和行为,并就这些类的使用给出了一些编程风格上的建议。 当在 Jav... 阅读全文

posted @ 2009-09-27 17:13 ATAK 阅读(1251) 评论(0) 推荐(0) 编辑

c++指针相等的问题

摘要: #include "stdafx.h"#include <iostream>#include <string>using namespace std;int _tmain(int argc, _TCHAR* argv[]){ string test("just a test"); string* ptrOne=&test; string* ptrTwo=&t... 阅读全文

posted @ 2009-09-27 15:40 ATAK 阅读(1635) 评论(0) 推荐(0) 编辑

导航