Some objects must be destroyed on server quit.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11613 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
#include "FontServer.h"
|
#include "FontServer.h"
|
||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
#include "RootLayer.h"
|
#include "RootLayer.h"
|
||||||
|
#include <StopWatch.h>
|
||||||
//#define DEBUG_KEYHANDLING
|
//#define DEBUG_KEYHANDLING
|
||||||
//#define DEBUG_SERVER
|
//#define DEBUG_SERVER
|
||||||
|
|
||||||
@@ -164,7 +164,8 @@ AppServer::AppServer(void)
|
|||||||
*/
|
*/
|
||||||
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;
|
ServerApp *tempapp;
|
||||||
int32 i;
|
int32 i;
|
||||||
acquire_sem(fAppListLock);
|
acquire_sem(fAppListLock);
|
||||||
@@ -189,6 +190,7 @@ AppServer::~AppServer(void)
|
|||||||
delete fontserver;
|
delete fontserver;
|
||||||
|
|
||||||
make_decorator=NULL;
|
make_decorator=NULL;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -623,14 +625,13 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg)
|
|||||||
// is compiled as a regular Be application.
|
// is compiled as a regular Be application.
|
||||||
if(DISPLAYDRIVER== HWDRIVER)
|
if(DISPLAYDRIVER== HWDRIVER)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Broadcast(AS_QUIT_APP);
|
Broadcast(AS_QUIT_APP);
|
||||||
|
|
||||||
// we have to wait until *all* threads have finished!
|
// we have to wait until *all* threads have finished!
|
||||||
ServerApp *app= NULL;
|
ServerApp *app= NULL;
|
||||||
acquire_sem(fAppListLock);
|
acquire_sem(fAppListLock);
|
||||||
thread_info tinfo;
|
thread_info tinfo;
|
||||||
|
|
||||||
for(int32 i= 0; i < fAppList->CountItems(); i++)
|
for(int32 i= 0; i < fAppList->CountItems(); i++)
|
||||||
{
|
{
|
||||||
app=(ServerApp*)fAppList->ItemAt(i);
|
app=(ServerApp*)fAppList->ItemAt(i);
|
||||||
@@ -668,8 +669,11 @@ void AppServer::DispatchMessage(int32 code, BPortLink &msg)
|
|||||||
release_sem(fAppListLock);
|
release_sem(fAppListLock);
|
||||||
|
|
||||||
delete desktop;
|
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);
|
exit_thread(0);
|
||||||
|
|
||||||
// we are now clear to exit
|
// we are now clear to exit
|
||||||
|
|||||||
Reference in New Issue
Block a user