Minor fix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17337 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-07-25 13:58:25 +00:00
parent 355641fc4d
commit e2358c5980
2 changed files with 5 additions and 2 deletions

View file

@ -8,6 +8,7 @@
* Source/NSConnection.m: Fix thread related memory leak leaving
an NSRunLoop in a connection when the connection is no longer
using it.
* Source/NSURL.m: retain handle while doing background load.
2003-07-23 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1138,7 +1138,7 @@ static unsigned urlAlign;
[clientsLock lock];
if (_clients == 0)
{
_clients = NSCreateMapTable (NSNonRetainedObjectMapKeyCallBacks,
_clients = NSCreateMapTable (NSObjectMapKeyCallBacks,
NSNonRetainedObjectMapValueCallBacks, 0);
}
NSMapInsert((NSMapTable*)_clients, (void*)handle, (void*)client);
@ -1566,6 +1566,8 @@ static unsigned urlAlign;
{
id c = clientForHandle(_clients, sender);
RETAIN(self);
[sender removeClient: self];
if (c != nil)
{
if ([c respondsToSelector: @selector(URLResourceDidFinishLoading:)])
@ -1576,7 +1578,7 @@ static unsigned urlAlign;
NSMapRemove((NSMapTable*)_clients, (void*)sender);
[clientsLock unlock];
}
[sender removeClient: self];
RELEASE(self);
}
@end