改名
This commit is contained in:
@@ -25,14 +25,13 @@ class ObjectPool extends \Snowflake\Abstracts\Pool
|
|||||||
* ObjectPool constructor.
|
* ObjectPool constructor.
|
||||||
* @param array $config
|
* @param array $config
|
||||||
* @throws ComponentException
|
* @throws ComponentException
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function __construct($config = [])
|
public function __construct($config = [])
|
||||||
{
|
{
|
||||||
$this->max = 5000;
|
$this->max = 5000;
|
||||||
|
|
||||||
|
listen(Event::EVENT_AFTER_REQUEST, [$this, 'destruct']);
|
||||||
$event = Snowflake::app()->getEvent();
|
|
||||||
$event->on(Event::EVENT_AFTER_REQUEST, [$this, 'destruct']);
|
|
||||||
|
|
||||||
parent::__construct($config);
|
parent::__construct($config);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user