Société Générale Interview Question

How Garbage collection works