public function unload()
    {
        if (null === $this->state) {
            throw new NotLoadedException('The mapping is not loaded.');
        }

        $conflictsToRelease = $this->conflicts;

        $this->conflicts = array();

        foreach ($conflictsToRelease as $conflict) {
            $conflict->removeMapping($this);
        }

        $this->filesystemPaths = array();
        $this->pathMappings = array();
        $this->repositoryPaths = array();
        $this->loadErrors = array();
        $this->containingModule = null;
        $this->state = null;
    }