Domanda di colloquio di TiVo

How does the garbage collector in java work?

Risposta di colloquio

Anonimo

11 lug 2017

GC is a built in feature which allows new objects being created without worrying explicitly about memory allocation/deallocation. Garbage collection automatically reclaims memory for reuse which enables faster development by reducing/eliminating memory leaks. All of the heap memory that is not occupied by marked objects is reclaimed, unused objects supposedly cleared..