MainApp::~MainApp() { if (m_pOfflineDialog) { m_pOfflineDialog->EndModal(0); } safe_delete(m_vNewsItems); safe_delete(m_pInternalLink); //delete user first so threads will not die when they try to access webcore //should be deleted on logout but just to make sure Thread::AutoLock a(m_UserLock); if (m_wxTBIcon) m_wxTBIcon->deregEvents(); safe_delete(g_pDeleteThread); g_pDeleteThread = new DeleteUserThread(g_pUserHandle); #ifdef NIX g_pDeleteThread->start(); #else g_pDeleteThread->run(); safe_delete(g_pDeleteThread); #endif g_pUserHandle = NULL; safe_delete(m_wxTBIcon); DestroyManagers(); DestroyLogging(); }
/////////////////////////////////////////////////////////////////////////////// //tears the world down Entresol::~Entresol() { DestroyAllManagers(); DestroyAllManagerFactories(); DestroyLogging(); SDL_Quit(); DestroyOgre(); }
int OnExit() { DestroyLogging(); wxWindow::MSWUnregisterMessageHandler(WM_ENDSESSION, &WindowsShutdown); wxWindow::MSWUnregisterMessageHandler(WM_QUERYENDSESSION, &WindowsShutdown); g_pMainApp = nullptr; DestroyManagers(); return wxApp::OnExit(); }
MainApp::~MainApp() { if (m_pOfflineDialog) m_pOfflineDialog->EndModal(0); #ifdef WITH_GTEST if (m_UnitTestForm) { m_UnitTestForm->canClose(); m_UnitTestForm->Close(); } #endif safe_delete(m_pInternalLink); //delete user first so threads will not die when they try to access webcore //should be deleted on logout but just to make sure std::lock_guard<std::mutex> a(m_UserLock); if (m_wxTBIcon) m_wxTBIcon->deregEvents(); safe_delete(g_pDeleteThread); g_pDeleteThread = new DeleteUserThread(g_pUserHandle); #ifdef NIX g_pDeleteThread->start(); #else g_pDeleteThread->run(); safe_delete(g_pDeleteThread); #endif g_pUserHandle = nullptr; safe_delete(m_wxTBIcon); DestroyManagers(); DestroyLogging(); #if WIN32 // Temporary resolve PostQuitMessage(0); #endif // WIN32 }
void shutDownFactory() { buildFactory = NULL; delFactory = NULL; DestroyLogging(); }