diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-09-30 20:25:02 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-09-30 20:25:02 (GMT) |
commit | a63f7ba43c9200dd385b34c658c500eedc222e3f (patch) | |
tree | 045253ed81e3cae887d7940e67dd8336458bff02 /Source/cmDynamicLoader.cxx | |
parent | 04d8ba688cf670fc20ea92d472dfba67556a5e68 (diff) | |
download | CMake-a63f7ba43c9200dd385b34c658c500eedc222e3f.zip CMake-a63f7ba43c9200dd385b34c658c500eedc222e3f.tar.gz CMake-a63f7ba43c9200dd385b34c658c500eedc222e3f.tar.bz2 |
BUG: fix load command stuff for cygwin and cleanup at exit
Diffstat (limited to 'Source/cmDynamicLoader.cxx')
-rw-r--r-- | Source/cmDynamicLoader.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index 7e21a7f..75c3850 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -44,7 +44,6 @@ cmDynamicLoaderCache* cmDynamicLoaderCache::Instance = 0; cmDynamicLoaderCache::~cmDynamicLoaderCache() { - this->FlushCache(); } void cmDynamicLoaderCache::CacheFile(const char* path, const cmLibHandle& p) @@ -71,13 +70,16 @@ bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p) bool cmDynamicLoaderCache::FlushCache(const char* path) { std::map<std::string, cmLibHandle>::iterator it = m_CacheMap.find(path); + bool ret = false; if ( it != m_CacheMap.end() ) { cmDynamicLoader::CloseLibrary(it->second); m_CacheMap.erase(it); - return true; + ret = true; } - return false; + delete cmDynamicLoaderCache::Instance; + cmDynamicLoaderCache::Instance = 0; + return ret; } void cmDynamicLoaderCache::FlushCache() |