A memory leak happens when objects are created in java programs but not closed/memory reclaimed after being used, so these objects are doing nothing but occupying memory. In other words, a huge chunk of the memory is unproductively occupied by objects that are no longer being used but cannot be removed as a reference to these objects exists somewhere in the JVM . Hence, there is no mo... https://bookmarkshq.com/story20679336/java-garbage-collection