/** * Destroys the UV loop handle when the loop is destroyed. */ public function __destruct() { if (is_resource($this->loopHandle)) { \uv_loop_delete($this->loopHandle); $this->loopHandle = null; } }
/** * @codeCoverageIgnore */ public function __destruct() { $this->reset(); if (\is_resource($this->loop)) { \uv_loop_delete($this->loop); } }
/** * Stops the loop (mainly in case the loop would have been run infinitely) * * @param int|null $signal * @return LoopInterface */ public function stop($signal = null) { if ($this->loop !== \uv_default_loop()) { \uv_loop_delete($this->loop); } return $this; }