jubincn

导航

为什么在进行Full GC之前最好进行一次Minor GC

摘自:《Java Performance》第三章

为什么在进行Full GC之前最好进行一次Minor GC?

Garbage collecting the young generation space prior to garbage collecting the old generation space usually results in less work for the garbage collector and more objects being garbage collected since objects in the old generation space may be holding object references to objects in the young generation space. If the young generation space is not garbage collected, any object in old generation space that holds a reference to an object in young generation space cannot be garbage collected.

posted on 2013-08-05 19:06  jubincn  阅读(331)  评论(0编辑  收藏  举报