AIP中的描述 public static void gc() Runs the garbage collector. Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects. Calling the gc method suggests-----仅仅是建议虚拟机收回内存,什么时候收回是不能确定的。
public static void gc()
Runs the garbage collector.
Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects. Calling the gc method suggests-----仅仅是建议虚拟机收回内存,什么时候收回是不能确定的。