Explain how garbage collection works in Java and how you would diagnose a memory leak in a production environment at Tink.