How does garbage collection work in your preferred programming language?

Technical