This commit is contained in:
2021-02-23 19:30:50 +08:00
parent 1ad9cd4646
commit a78280af29
+5
View File
@@ -76,11 +76,16 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
} }
/**
* @throws ComponentException
* 清理等待回收的对象
*/
public function destruct() public function destruct()
{ {
if (empty($this->_waitRecover)) { if (empty($this->_waitRecover)) {
return; return;
} }
$this->warning('destruct object...');
foreach ($this->_waitRecover as $name => $value) { foreach ($this->_waitRecover as $name => $value) {
if (empty($value)) { if (empty($value)) {
continue; continue;