]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
crash in some very special case when arrows were used to move around fixed
[wxWidgets.git] / src / gtk / app.cpp
index d499026b381d301783387a5cc209da6adefc5cc5..0f4c0825c3a510f4f8f93106b3d5491874f5bd2a 100644 (file)
 #endif
 #include "unistd.h"
 
+// add more here if you run into problems
+#if defined(__SUN__) && !defined(__SunOs_5_6) && !defined(__SunOs_5_7) && !defined(__SUNPRO_CC)
+extern "C" 
+{
+void usleep(unsigned long usec); 
+};
+#endif
+
 #include "glib.h"
 #include "gdk/gdk.h"
 #include "gtk/gtk.h"
@@ -444,6 +452,12 @@ void wxApp::CleanUp(void)
     delete wxTheApp;
     wxTheApp = (wxApp*) NULL;
 
+    wxSystemSettings::Done();
+    
+    delete[] wxBuffer;
+
+    wxClassInfo::CleanUpClasses();
+    
     /* check for memory leaks */
 #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
     if (wxDebugContext::CountObjectsLeft() > 0)
@@ -459,12 +473,6 @@ void wxApp::CleanUp(void)
     
     wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
     if (oldLog) delete oldLog;
-
-    wxSystemSettings::Done();
-    
-    wxClassInfo::CleanUpClasses();
-
-    delete[] wxBuffer;
 }
 
 wxLog *wxApp::CreateLogTarget()