改名
This commit is contained in:
@@ -62,11 +62,7 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
|
|||||||
*/
|
*/
|
||||||
public function release(string $name, mixed $object)
|
public function release(string $name, mixed $object)
|
||||||
{
|
{
|
||||||
$newObject = clone $object;
|
$this->push($name, clone $object);
|
||||||
if (method_exists($newObject, 'clean')) {
|
|
||||||
$newObject->clean();
|
|
||||||
}
|
|
||||||
$this->push($name, $newObject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user