In Java, you cannot βcallβ the garbage collector. If you see the documentation when you call the System.gc () method, vm simply takes the offer to run the garbage collector, but there is no guarantee what is actually called. It is an internal process that will be called automatically, even if you do not call it when it needs space on the stack.
If you see a lot of full GC, this may be a sign that the application is not freeing resources correctly. You have to keep an eye on the bunch to see what the problem is.
jasalguero
source share