Browse Source

ENH: fix memory leaks

Bill Hoffman 24 năm trước cách đây
mục cha
commit
e57a982136
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      Source/MFCDialog/CMakeSetup.cpp

+ 5 - 0
Source/MFCDialog/CMakeSetup.cpp

@@ -5,6 +5,8 @@
 #include "CMakeSetup.h"
 #include "CMakeSetup.h"
 #include "CMakeSetupDialog.h"
 #include "CMakeSetupDialog.h"
 #include "CMakeCommandLineInfo.h" 
 #include "CMakeCommandLineInfo.h" 
+#include "../cmListFileCache.h"
+#include "../cmMakefileGenerator.h"
 
 
 #ifdef _DEBUG
 #ifdef _DEBUG
 #define new DEBUG_NEW
 #define new DEBUG_NEW
@@ -73,6 +75,9 @@ BOOL CMakeSetup::InitInstance()
     //  dismissed with Cancel
     //  dismissed with Cancel
     }
     }
 
 
+  // clean up globals 
+  cmListFileCache::GetInstance()->ClearCache(); 
+  cmMakefileGenerator::UnRegisterGenerators();
   // Since the dialog has been closed, return FALSE so that we exit the
   // Since the dialog has been closed, return FALSE so that we exit the
   //  application, rather than start the application's message pump.
   //  application, rather than start the application's message pump.
   return FALSE;
   return FALSE;