summaryrefslogtreecommitdiffstats
path: root/Source/cmDynamicLoader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDynamicLoader.cxx')
-rw-r--r--Source/cmDynamicLoader.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index 75c3850..680e50c 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -77,8 +77,6 @@ bool cmDynamicLoaderCache::FlushCache(const char* path)
m_CacheMap.erase(it);
ret = true;
}
- delete cmDynamicLoaderCache::Instance;
- cmDynamicLoaderCache::Instance = 0;
return ret;
}
@@ -89,7 +87,8 @@ void cmDynamicLoaderCache::FlushCache()
{
cmDynamicLoader::CloseLibrary(it->second);
}
- m_CacheMap.erase(m_CacheMap.begin(), m_CacheMap.end());
+ delete cmDynamicLoaderCache::Instance;
+ cmDynamicLoaderCache::Instance = 0;
}
cmDynamicLoaderCache* cmDynamicLoaderCache::GetInstance()