Question d’entretien chez Bloomberg

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

Réponses aux questions d'entretien

Utilisateur anonyme

2 mars 2013

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

1

Utilisateur anonyme

7 mars 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.