mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 04:00:37 +00:00
Better release/retain of server and context
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a239713bc0
commit
354b959318
7 changed files with 105 additions and 30 deletions
|
@ -46,9 +46,6 @@ static Class defaultServerClass = NULL;
|
|||
/* Maps windows to a server */
|
||||
static NSMapTable *windowmaps = NULL;
|
||||
|
||||
/* Current server */
|
||||
static GSDisplayServer *currentServer = nil;
|
||||
|
||||
/* Lock for use when creating contexts */
|
||||
static NSRecursiveLock *serverLock = nil;
|
||||
|
||||
|
@ -209,7 +206,7 @@ GSCurrentServer(void)
|
|||
|
||||
/**
|
||||
Causes the server to disconnect from the display. If the receiver
|
||||
is the current server, it removes it self and sets the current
|
||||
is the current server, it removes itself and sets the current
|
||||
server to nil. Sending any more messages to the receiver after this
|
||||
is likely to cause severe problems and probably crash the
|
||||
application.
|
||||
|
@ -222,8 +219,6 @@ GSCurrentServer(void)
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (self == GSCurrentServer())
|
||||
currentServer = nil;
|
||||
DESTROY(server_info);
|
||||
DESTROY(event_queue);
|
||||
NSFreeMapTable(drag_types);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue