From d29c4f528724df7da4828b922bfdc8424933c659 Mon Sep 17 00:00:00 2001 From: Adi Oanca Date: Mon, 7 Mar 2005 21:52:41 +0000 Subject: [PATCH] Some objects must be destroyed on server quit. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11613 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/server/AppServer.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/servers/app/server/AppServer.cpp b/src/servers/app/server/AppServer.cpp index d8dc1a6a86..733bebb255 100644 --- a/src/servers/app/server/AppServer.cpp +++ b/src/servers/app/server/AppServer.cpp @@ -48,7 +48,7 @@ #include "FontServer.h" #include "Desktop.h" #include "RootLayer.h" - +#include //#define DEBUG_KEYHANDLING //#define DEBUG_SERVER @@ -164,7 +164,8 @@ AppServer::AppServer(void) */ AppServer::~AppServer(void) { - + debugger("We shouldn't be here! MainLoop()::B_QUIT_REQUESTED should see if we can exit the server.\n"); +/* ServerApp *tempapp; int32 i; acquire_sem(fAppListLock); @@ -189,6 +190,7 @@ AppServer::~AppServer(void) delete fontserver; make_decorator=NULL; +*/ } /*! @@ -623,14 +625,13 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg) // is compiled as a regular Be application. if(DISPLAYDRIVER== HWDRIVER) break; - + Broadcast(AS_QUIT_APP); // we have to wait until *all* threads have finished! ServerApp *app= NULL; acquire_sem(fAppListLock); thread_info tinfo; - for(int32 i= 0; i < fAppList->CountItems(); i++) { app=(ServerApp*)fAppList->ItemAt(i); @@ -668,8 +669,11 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg) release_sem(fAppListLock); delete desktop; + delete fAppList; + delete bitmapmanager; + delete fontserver; + make_decorator=NULL; - // When we delete the last ServerApp, we can exit the server exit_thread(0); // we are now clear to exit