HOW YOU CAN FORCE THE GARBAGE COLLECTION?

Mahesh Rawat

Total Post:138

Points:690
Posted by  Mahesh Rawat
Java 
 1101  View(s)
Ratings:
Rate this:
  1. Mahesh Rawat

    Post:138

    Points:690
    How you can force the garbage collection?

    You can't force it but you call System.gc(), which is a "hint" to the runtime engine that now might be a good time to run the GC. But garbage collection using this method is not guaranteed to be done immediately.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!