是不是finalize()可以确保全部清除?

解决方案 »

  1.   

    1 Circular referecces does not prevent GC
    2 Finalizer is called only once on the object before gc.
    3 Object class contains finalize() method therefore all objects    have finalize method protedted void finalize() throw Throwable{...}
    4 Normal exception handling occrus even in the finalize() method
    5 It is not mandatory to call the overriden method finalize() from superclass Finalizers are not implicitly chained like a constructors for subclass