For programming languages that run on JVM such as Kotlin, Java, and so on, JVM automatically manages the memory. In our programs, we don't have to explicitly allocate and deallocate memory. In languages such as C and C++, it is the responsibility of programs to manage memory. This can become difficult when an application becomes big and could be erroneous when it has to manage memory explicitly.
Automatic garbage collection makes life easier, as the program doesn't need to handle memory in this case. JVM's garbage collector manages memory, allocating it to the objects that the program creates. It then reclaims it when these objects are no longer referenced by the program so that the memory becomes available to other objects in the application.
Automatic garbage collection reduces a lot of overhead that the program would have otherwise created...