Add a method to close a Connection object and remove its accounting