在C/C++中,需要自己负责object的creation 和 destruction. 如果忘记了destruction, 就容易出现OutOfMemoryErrors. Java中会有GC直接处理unreachable objects. 什么是unreachable objects: Integer i = new Integer(4); // the new Integer object is reachable via the reference in 'i' i = null; //…