Aug 03
It’s called garbage collection, not resource collection!
Java’s garbage collector has made life so easy for us developers that we sometimes confuse between deleting a reference, i.e. a task the GC does, and releasing a resource – a task the GC doesn’t do. That’s because the GC does something else for us called object finalization, where resources usually clean themselves up.
When I say resources, just think of input/output streams, readers/writers, channels, JDBC, JMS.. the list could go on and on. I almost expect to see code such as: Continue reading »