Run Garbage collector

What does the Run Garbage collector button on the bottom right of IDEA mean? AFAIK, there is no way to force garbage collection.

4 comments
Comment actions Permalink

Try it out yourself.

0
Comment actions Permalink

bodhi wrote:

What does the Run Garbage collector button on the bottom right of IDEA mean? AFAIK, there is no way to force garbage collection.

System.gc();

N.

0
Comment actions Permalink

In theory that doesn't force a GC (as per the javadocs) however in practice
it does on Sun VMs, especially if called a few times in a row.

bodhi wrote:

>> What does the Run Garbage collector button on the bottom right of
>> IDEA mean? AFAIK, there is no way to force garbage collection.
>>

System.gc();

N.



0
Comment actions Permalink

It asks the VM politely to do (some) garbage collection.

RRS

0

Please sign in to leave a comment.