mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fix string reuse. Don't release obs. Make sure n is always released.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19977 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d5e6b59325
commit
5b08868c60
2 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-09-03 19:08 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Tools/gdnc.m
|
||||
(-addObserver:selector:name:object:suspensionBehavior:for:): Fix
|
||||
string reuse.
|
||||
(-postNotificationName:object:userInfo:deliverImmediately:for:):
|
||||
Make sure queued notifications are always released. Don't release
|
||||
obs.
|
||||
|
||||
2004-09-02 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Source/GSFFCallInvocation.m
|
||||
|
|
11
Tools/gdnc.m
11
Tools/gdnc.m
|
@ -557,7 +557,7 @@ ihandler(int sig)
|
|||
{
|
||||
GDNCObserver *tmp = [namList objectAtIndex: 0];
|
||||
|
||||
notificationName = tmp->notificationObject;
|
||||
notificationName = tmp->notificationName;
|
||||
}
|
||||
obs->notificationName = RETAIN(notificationName);
|
||||
[namList addObject: obs];
|
||||
|
@ -750,24 +750,23 @@ ihandler(int sig)
|
|||
while (obs != nil && [obs->queue count] > 0
|
||||
&& NSHashGet(allObservers, obs) != 0)
|
||||
{
|
||||
GDNCNotification *n;
|
||||
n = RETAIN([obs->queue objectAtIndex: 0]);
|
||||
NS_DURING
|
||||
{
|
||||
GDNCNotification *n;
|
||||
|
||||
n = RETAIN([obs->queue objectAtIndex: 0]);
|
||||
[obs->queue removeObjectAtIndex: 0];
|
||||
[obs->client->client postNotificationName: n->name
|
||||
object: n->object
|
||||
userInfo: n->info
|
||||
selector: obs->selector
|
||||
to: obs->observer];
|
||||
RELEASE(n);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
DESTROY(obs);
|
||||
obs = nil;
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
RELEASE(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue