summaryrefslogtreecommitdiffstats
path: root/Source/cmDynamicLoader.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-10-09 21:47:24 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-10-09 21:47:24 (GMT)
commitcceb68f2a09160f90d2a908b862c05a006a9c76f (patch)
tree89dca9f8ab05747756f7df1e668959fb246922e7 /Source/cmDynamicLoader.cxx
parentb431046277922ad4f1dc8a40516311641fda14d0 (diff)
downloadCMake-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.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()