summaryrefslogtreecommitdiffstats
path: root/Source/cmaketest.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/cmaketest.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/cmaketest.cxx')
-rw-r--r--Source/cmaketest.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmaketest.cxx b/Source/cmaketest.cxx
index 45ce992..e21ef6f 100644
--- a/Source/cmaketest.cxx
+++ b/Source/cmaketest.cxx
@@ -20,13 +20,25 @@
#include "cmake.h"
#include "cmListFileCache.h"
#include "cmCacheManager.h"
+#include "cmDynamicLoader.h"
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "windows.h"
#endif
+int do_cmaketest(int ac, char** av);
+
+int main(int ac, char** av)
+{
+ int ret = do_cmaketest(ac, av);
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ cmDynamicLoader::FlushCache();
+#endif
+ cmListFileCache::GetInstance()->ClearCache();
+ return ret;
+}
// this is a test driver program for cmake.
-int main (int argc, char **argv)
+int do_cmaketest (int argc, char **argv)
{
if (argc < 4)
{