Société Générale interview question

How Garbage collection works