+ 1
Generally gc is managed by the jvm (java virtual machine) automatically.
Your program can 'ask' the jvm to do this immediately or as soon as convenient... using System.gc()
But it is not guaranteed to run right away (depends on jvm implementation) and it might cause more harm than good.
I recommend to read through the comments below if you are more interested:
https://stackoverflow.com/questions/66540/when-does-system-gc-do-something



