summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-09 15:07:35 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-09 15:07:35 (GMT)
commitfdd4cf7cf47ac5115e0adf30c693366227857b4f (patch)
tree5a8a8f96d7a2ccacbeb3fc4dd19af12f99bf33e8 /Source/MFCDialog
parentb472d792bec179345b8230a19ec55dc683459d3c (diff)
downloadCMake-fdd4cf7cf47ac5115e0adf30c693366227857b4f.zip
CMake-fdd4cf7cf47ac5115e0adf30c693366227857b4f.tar.gz
CMake-fdd4cf7cf47ac5115e0adf30c693366227857b4f.tar.bz2
clean up leaks
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/CMakeSetup.cpp6
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp12
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.h4
3 files changed, 14 insertions, 8 deletions
diff --git a/Source/MFCDialog/CMakeSetup.cpp b/Source/MFCDialog/CMakeSetup.cpp
index aadeb34..6dea7bf 100644
--- a/Source/MFCDialog/CMakeSetup.cpp
+++ b/Source/MFCDialog/CMakeSetup.cpp
@@ -5,9 +5,6 @@
#include "CMakeSetup.h"
#include "CMakeSetupDialog.h"
#include "CMakeCommandLineInfo.h"
-#include "../cmListFileCache.h"
-#include "../cmCacheManager.h"
-#include "../cmDynamicLoader.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -76,9 +73,6 @@ BOOL CMakeSetup::InitInstance()
// dismissed with Cancel
}
- // clean up globals
- cmListFileCache::GetInstance()->ClearCache();
- cmDynamicLoader::FlushCache();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 240efcd..746597e 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -9,10 +9,12 @@
#include "MakeHelp.h"
#include "PathDialog.h"
#include "CMakeSetupDialog.h"
-#include "CMakeCommandLineInfo.h"
+#include "CMakeCommandLineInfo.h"
+#include "../cmListFileCache.h"
#include "../cmCacheManager.h"
#include "../cmake.h"
#include "../cmGlobalGenerator.h"
+#include "../cmDynamicLoader.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@@ -167,6 +169,14 @@ CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
}
+CMakeSetupDialog::~CMakeSetupDialog()
+{
+ delete m_CMakeInstance;
+ // clean up globals
+ cmListFileCache::GetInstance()->ClearCache();
+ cmDynamicLoader::FlushCache();
+}
+
void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
diff --git a/Source/MFCDialog/CMakeSetupDialog.h b/Source/MFCDialog/CMakeSetupDialog.h
index 6812f9e..354c7c9 100644
--- a/Source/MFCDialog/CMakeSetupDialog.h
+++ b/Source/MFCDialog/CMakeSetupDialog.h
@@ -37,7 +37,9 @@ class CMakeSetupDialog : public CDialog
// Construction
public:
CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
- CWnd* pParent = NULL);
+ CWnd* pParent = NULL);
+
+ ~CMakeSetupDialog();
// return the cmake that is currently being used
cmake *GetCMakeInstance() {
return m_CMakeInstance; }