The Java Virtual Machine (JVM) ships with garbage collector(s) that are responsible for reclaiming the heap space and freeing unused resources as deemed necessary during an application's lifetime. They are reliable, performant, well-tested and are invoked as deemed necessary. Manually invoking the GC does not necessarily improve the application's performance and in some cases may even adversely impact the performance. If you wish to improve your application's performance, consider -