public function __destruct() { if (class_exists('DatabaseConnectionPool')) { DatabaseConnectionPool::freeConnection($this); } }