IDNStudy.com, ang iyong mapagkukunan para sa malinaw at mabilis na mga sagot. Makakuha ng hakbang-hakbang na mga gabay para sa lahat ng iyong teknikal na tanong mula sa mga miyembro ng aming komunidad.
Answer:
As long as an object is being referenced, the JVM considers it alive. Once an object is no longer referenced and therefore is not reachable by the application code, the garbage collector removes it and reclaims the unused memory.