Bikash Mainalibikash8848.hashnode.dev·Oct 23, 2023Java Memory ManagementWhen does the garbage collector free up heap memory? All is taken care of by JVM Algorithm used by GC: Mark & Sweep Mark: JVM mark those objects which are being referenced (Has Connection to Stack Memory). Sweep: JVM sweep those objects which are no ...Java