This commit is contained in:
2021-02-23 19:12:28 +08:00
parent c6224cc246
commit cbe9cc0c11
+1 -5
View File
@@ -62,11 +62,7 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
*/
public function release(string $name, mixed $object)
{
$newObject = clone $object;
if (method_exists($newObject, 'clean')) {
$newObject->clean();
}
$this->push($name, $newObject);
$this->push($name, clone $object);
}
}