1.

What Is Garbage Collection And What Are Its Advantages?

Answer»
  • Garbage collection is the process of looking at HEAP memory, identifying which objects are in use and which are not, and deleting the UNUSED objects.
  • An in-use object, or a referenced object, means that some PART of your program still maintains a pointer to that object. An unused object, or unreferenced object, is no longer referenced by any part of your program. So the memory used by an unreferenced object can be reclaimed.
  • The BIGGEST advantage of garbage collection is that it removes the burden of MANUAL memory allocation/deal location from us so that we can focus on solving the problem at hand.



Discussion

No Comment Found