/** * Disconnects from the server and destroys the underlying resource when * PHP's garbage collector kicks in. */ public function __destruct() { phpiredis_reader_destroy($this->reader); if ($this->isConnected()) { $this->disconnect(); } }
/** * Frees the underlying cURL and protocol reader resources when PHP's * garbage collector kicks in. */ public function __destruct() { curl_close($this->_resource); phpiredis_reader_destroy($this->_reader); }
/** * Disconnects from the server and destroys the underlying resource and the * protocol reader resource when PHP's garbage collector kicks in. */ public function __destruct() { phpiredis_reader_destroy($this->reader); parent::__destruct(); }