An open database may be closed with the command $db->close().
See $db->close() for detailed information.