fix retain/release errors

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29770 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-02-26 06:53:47 +00:00
parent 4bd2606d7d
commit 2de66f9c28
3 changed files with 13 additions and 13 deletions

View file

@ -1001,7 +1001,7 @@ static Class runLoopClass;
l = [runLoopClass currentRunLoop]; l = [runLoopClass currentRunLoop];
IF_NO_GC([self retain];) IF_NO_GC(RETAIN(self);)
[l addEvent: (void*)(uintptr_t)desc [l addEvent: (void*)(uintptr_t)desc
type: ET_WDESC type: ET_WDESC
@ -1035,9 +1035,9 @@ static Class runLoopClass;
sent = YES; sent = YES;
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self);
NSDebugMLLog(@"NSMessagePort_details", NSDebugMLLog(@"NSMessagePort_details",
@"Message send 0x%x on 0x%x status %d", components, self, sent); @"Message send 0x%x on 0x%x status %d", components, self, sent);
RELEASE(self);
return sent; return sent;
} }
@ -1580,7 +1580,7 @@ typedef struct {
{ {
if ([self isValid] == YES) if ([self isValid] == YES)
{ {
IF_NO_GC([self retain];) IF_NO_GC(RETAIN(self);)
M_LOCK(myLock); M_LOCK(myLock);
if ([self isValid] == YES) if ([self isValid] == YES)
@ -1612,7 +1612,7 @@ typedef struct {
[super invalidate]; [super invalidate];
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self); RELEASE(self);
} }
} }
@ -1715,7 +1715,7 @@ typedef struct {
- (void) removeHandle: (GSMessageHandle*)handle - (void) removeHandle: (GSMessageHandle*)handle
{ {
IF_NO_GC([self retain];) IF_NO_GC(RETAIN(self);)
M_LOCK(myLock); M_LOCK(myLock);
if ([handle sendPort] == self) if ([handle sendPort] == self)
{ {
@ -1742,7 +1742,7 @@ typedef struct {
[self invalidate]; [self invalidate];
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self); RELEASE(self);
} }
/* /*

View file

@ -1436,9 +1436,9 @@ static Class runLoopClass;
sent = YES; sent = YES;
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self);
NSDebugMLLog(@"GSTcpHandle", NSDebugMLLog(@"GSTcpHandle",
@"Message send 0x%x on 0x%x status %d", components, self, sent); @"Message send 0x%x on 0x%x status %d", components, self, sent);
RELEASE(self);
return sent; return sent;
} }
@ -2100,7 +2100,7 @@ static Class tcpPortClass;
[super invalidate]; [super invalidate];
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self); RELEASE(self);
} }
} }
@ -2258,7 +2258,7 @@ static Class tcpPortClass;
* been retained - we must therefore release this port since the * been retained - we must therefore release this port since the
* handle no longer uses it. * handle no longer uses it.
*/ */
DESTROY(self); IF_NO_GC(RELEASE(self);)
} }
handle->sendPort = nil; handle->sendPort = nil;
} }
@ -2275,7 +2275,7 @@ static Class tcpPortClass;
[self invalidate]; [self invalidate];
} }
M_UNLOCK(myLock); M_UNLOCK(myLock);
DESTROY(self); RELEASE(self);
} }
/* /*

View file

@ -460,7 +460,7 @@ static Class messagePortClass = 0;
} }
M_UNLOCK(this->lock); M_UNLOCK(this->lock);
} }
DESTROY(self); RELEASE(self);
} }
- (BOOL) isEqual: (id)anObject - (BOOL) isEqual: (id)anObject
@ -917,7 +917,7 @@ again:
forMode: mode forMode: mode
all: YES]; all: YES];
} }
DESTROY(self); RELEASE(self);
} }
@ -1131,8 +1131,8 @@ again:
} }
} }
M_UNLOCK(this->lock); M_UNLOCK(this->lock);
DESTROY(self);
RELEASE(h); RELEASE(h);
RELEASE(self);
return sent; return sent;
} }