Domanda di colloquio di Goldman Sachs

How would you implement an automatic garbage collector in C++?

Risposta di colloquio

Anonimo

27 mar 2012

The answer I gave (which he said is how it is actually done) is to mirror how a cache works in hardware and periodically delete all references that are not held in the "cache" (which I stored as a priority queue).