src/Leevel/Di/Container.php
public function clear(): void
    {
        $prop = [
            'services',
            'instances',
            'singletons',
            'coroutineInstances',
        ];

        foreach ($prop as $item) {
            $this->{$item} = [];
        }

        $this->alias = [];
    }
public function clear(): void
    {
        $prop = [
            'services',
            'instances',
            'singletons',
            'coroutineInstances',
        ];

        foreach ($prop as $item) {
            $this->{$item} = [];
        }

        $this->alias = [];
    }
清理容器.