From cbe9cc0c11d7bbde47e150a7a1cadb83eabd9c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 23 Feb 2021 19:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/ObjectPool.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/System/Pool/ObjectPool.php b/System/Pool/ObjectPool.php index 36e0b8b3..806e7318 100644 --- a/System/Pool/ObjectPool.php +++ b/System/Pool/ObjectPool.php @@ -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); } }