void wxApp::CleanUp() { #if wxUSE_TOOLTIPS wxToolTip::RemoveToolTips() ; #endif #ifdef __WXMAC_OSX__ if (m_macEventPosted) { CFRelease(m_macEventPosted); } m_macEventPosted = NULL; #endif // One last chance for pending objects to be cleaned up wxTheApp->DeletePendingObjects(); wxMacDestroyNotifierTable() ; #ifndef __DARWIN__ # if __option(profile) ProfilerDump( (StringPtr)"\papp.prof" ) ; ProfilerTerm() ; # endif #endif UMACleanupToolbox() ; if (s_macCursorRgn) { ::DisposeRgn((RgnHandle)s_macCursorRgn); } if (!sm_isEmbedded) { RemoveEventHandler( (EventHandlerRef)(wxTheApp->m_macEventHandler) ); } if (!sm_isEmbedded) { AERemoveEventHandler( kCoreEventClass , kAEOpenDocuments , sODocHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEOpenApplication , sOAppHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEPrintDocuments , sPDocHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEReopenApplication , sRAppHandler , FALSE ) ; AERemoveEventHandler( kCoreEventClass , kAEQuitApplication , sQuitHandler , FALSE ) ; DisposeAEEventHandlerUPP( sODocHandler ) ; DisposeAEEventHandlerUPP( sOAppHandler ) ; DisposeAEEventHandlerUPP( sPDocHandler ) ; DisposeAEEventHandlerUPP( sRAppHandler ) ; DisposeAEEventHandlerUPP( sQuitHandler ) ; } wxAppBase::CleanUp(); }
/* ================= Sys_EndProfiling ================= */ void Sys_EndProfiling( void ) { unsigned char pstring[1024]; if ( !sys_profiling ) { return; } sys_profiling = qfalse; sprintf( (char *)pstring + 1, "%s:profile.txt", Cvar_VariableString( "fs_basepath" ) ); pstring[0] = strlen( (char *)pstring + 1 ); ProfilerDump( pstring ); ProfilerTerm(); }
int #if _WIN32_WCE _cdecl #endif main() { // afxMemDF |= allocMemDF | checkAlwaysMemDF; // The M4STRING package sometimes keeps a spare empty string around. // By allocating it here, we avoid a few bogus memory leak reports. c4_String empty; #if q4_MAC_LEAK_CHECK DebugNewForgetLeaks(); #endif #if q4_MWCW_PROFILER if(!ProfilerInit(collectDetailed, bestTimeBase, 20, 5)) { #endif TestBasics1(); TestBasics2(); TestNotify(); TestCustom1(); TestCustom2(); TestResize(); TestStores1(); TestStores2(); TestStores3(); TestStores4(); TestStores5(); TestDiffer(); TestExtend(); TestFormat(); TestMapped(); TestLimits(); #if q4_MWCW_PROFILER ProfilerDump("\pRegress.prof"); ProfilerTerm(); }