Pergunta de entrevista da empresa Bloomberg

How does Java Garbage Collection work? How would you implement garbage collection?

Respostas da entrevista

Sigiloso

2 de mar. de 2013

Look on youtube.. It's an entire lecture about it on UCLA's channel.

1

Sigiloso

7 de mar. de 2016

Description without details: 1. Keeps reference count for each object(which is a pointer) 2. Increments/decrement a these counters when need 3. When there is no enough memory for a new object or after some timeout(actually there are many decision making algorithms for go) it iterates over all counters and frees memory used for objects with ref count == 0.