Pregunta de entrevista de Lockheed Martin

How does garbage collection work?