public function clear(?string $namespace = self::DEFAULT_NAMESPACE): void
    {
        if (null === $namespace) {
            $this->nodeRefs = [];
            return;
        }

        unset($this->nodeRefs[$namespace]);
    }