void CArchiveManager::UnLoad(char *filename) { ArchiveMap::iterator iter = m_mapArchive.find(filename); if (iter == m_mapArchive.end()) { return; } CArchive *pArchive = iter->second; if (pArchive != NULL) { pArchive->UnLoad(); ArchiveFactoryMap::iterator iterFac = m_mapFactory.find(pArchive->GetType()); if (iterFac == m_mapFactory.end()) { // Factory not found OGRE_EXCEPT(CException::ERR_ITEM_NOT_FOUND, "Cannot find an archive factory to deal with archive of type " + pArchive->GetType(), "ArchiveManager::UnLoad"); } iterFac->second->DestroyInstance(pArchive); m_mapArchive.erase(iter); } }