X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9390a202a8b9d67d393faf3e1323885e6a27c127..20239453d57b635b6e578c4e46ef02b198512733:/src/gtk1/app.cpp diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 0df66f47b8..78eef6efe3 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -30,11 +30,21 @@ #endif #include "unistd.h" +// add more here if you run into problems +#if defined(__SUN__) && !defined(__SunOs_5_6) && !defined(__SunOs_5_7) +extern "C" +{ +void usleep(unsigned long usec); +}; +#endif + #include "glib.h" #include "gdk/gdk.h" #include "gtk/gtk.h" #include "wx/gtk/win_gtk.h" +#include // usleep() on solaris + //----------------------------------------------------------------------------- // global data //----------------------------------------------------------------------------- @@ -384,8 +394,10 @@ bool wxApp::Initialize(void) wxSystemSettings::Init(); +/* wxTheFontNameDirectory = new wxFontNameDirectory; wxTheFontNameDirectory->Initialize(); +*/ wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING ); wxTheColourDatabase->Initialize(); @@ -426,8 +438,10 @@ void wxApp::CleanUp(void) if (wxTheColourDatabase) delete wxTheColourDatabase; wxTheColourDatabase = (wxColourDatabase*) NULL; +/* if (wxTheFontNameDirectory) delete wxTheFontNameDirectory; wxTheFontNameDirectory = (wxFontNameDirectory*) NULL; +*/ wxDeleteStockObjects(); @@ -438,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) @@ -453,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()