changeset 332:b168df820681

* Fix crash on exit on win32. This was caused by incorrectly using fftw_free() to free the string returned from fftw_export_wisdom_to_string(), instead of plain free(). * Various debug artifacts related to tracking down the above
author Chris Cannam
date Fri, 14 Aug 2009 14:01:09 +0000 (2009-08-14)
parents 067a57de45e2
children faff9cd8f663
files main/MainWindow.cpp main/main.cpp
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed Jul 29 15:03:21 2009 +0000
+++ b/main/MainWindow.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -296,10 +296,12 @@
 
 MainWindow::~MainWindow()
 {
+//    std::cerr << "MainWindow::~MainWindow" << std::endl;
     delete m_keyReference;
     delete m_preferencesDialog;
     delete m_layerTreeDialog;
     Profiles::getInstance()->dump();
+//    std::cerr << "MainWindow::~MainWindow finishing" << std::endl;
 }
 
 void
--- a/main/main.cpp	Wed Jul 29 15:03:21 2009 +0000
+++ b/main/main.cpp	Fri Aug 14 14:01:09 2009 +0000
@@ -431,9 +431,9 @@
     gui->hide();
 
     cleanupMutex.lock();
+
     TransformFactory::deleteInstance();
     TempDirectory::getInstance()->cleanup();
-
     application.releaseMainWindow();
 
 #ifdef HAVE_FFTW3F
@@ -441,13 +441,13 @@
     char *cwisdom = fftwf_export_wisdom_to_string();
     if (cwisdom) {
         settings.setValue("wisdom", cwisdom);
-        fftwf_free(cwisdom);
+        free(cwisdom);
     }
 #ifdef HAVE_FFTW3
     cwisdom = fftw_export_wisdom_to_string();
     if (cwisdom) {
         settings.setValue("wisdom_d", cwisdom);
-        fftw_free(cwisdom);
+        free(cwisdom);
     }
 #endif
     settings.endGroup();