I'm writing a DB connection pool in Java. It's just a class that holds a bunch of connections and gives them out.
Do I need some kind of destructor method so that the DB connections will be closed when an instance of my class goes out of scope?
Edit: This is for learning purposes only. I would definitely use a reliable, open source connection pool in production use. I really just want to understand the memory management implications.