#include "wx/font.h"
#include "wx/settings.h"
#include "wx/resource.h"
+#include "wx/module.h"
#include "unistd.h"
wxClassInfo::InitializeClasses();
+ /* Debug stream no longer used
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
wxDebugContext::SetStream(oStr, sBuf);
-
#endif
+*/
if (!wxTheApp)
{
wxApp::CommonInit();
+ wxModule::RegisterModules();
+ if (!wxModule::InitializeModules()) return FALSE;
+
wxTheApp->OnInitGui();
// Here frames insert themselves automatically
wxTheApp->OnExit();
+ wxModule::CleanUpModules();
+
wxApp::CommonCleanUp();
wxDELETE(wxTheApp);
- wxLog *oldLog = wxLog::SetActiveTarget( NULL );
- if (oldLog) delete oldLog;
-
wxClassInfo::CleanUpClasses();
delete[] wxBuffer;
if (wxDebugContext::CountObjectsLeft() > 0)
{
- wxTrace("There were memory leaks.\n");
+ wxLogDebug("There were memory leaks.\n");
wxDebugContext::Dump();
wxDebugContext::PrintStatistics();
}
- wxDebugContext::SetStream(NULL, NULL);
+// wxDebugContext::SetStream(NULL, NULL);
#endif
+ wxLog *oldLog = wxLog::SetActiveTarget( NULL );
+ if (oldLog) delete oldLog;
+
+
return retValue;
}