diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-10-09 21:47:24 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-10-09 21:47:24 (GMT) |
commit | cceb68f2a09160f90d2a908b862c05a006a9c76f (patch) | |
tree | 89dca9f8ab05747756f7df1e668959fb246922e7 /Source/cmDynamicLoader.cxx | |
parent | b431046277922ad4f1dc8a40516311641fda14d0 (diff) | |
download | CMake-cceb68f2a09160f90d2a908b862c05a006a9c76f.zip CMake-cceb68f2a09160f90d2a908b862c05a006a9c76f.tar.gz CMake-cceb68f2a09160f90d2a908b862c05a006a9c76f.tar.bz2 |
Remove memory leak caused by cmDynamicLoader not being deleted properly
Diffstat (limited to 'Source/cmDynamicLoader.cxx')
-rw-r--r-- | Source/cmDynamicLoader.cxx | 5 |
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() |