mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Performance improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4215 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d7c8fa0305
commit
1dbd6cc410
8 changed files with 196 additions and 178 deletions
|
@ -33,17 +33,19 @@
|
|||
userInfo: info
|
||||
{
|
||||
[super init];
|
||||
_name = [name copy];
|
||||
_object = [object retain];
|
||||
_info = [info retain];
|
||||
_name = [name copyWithZone: NSDefaultMallocZone()];
|
||||
_object = (object != nil) ? RETAIN(object) : nil;
|
||||
_info = (info != nil) ? RETAIN(info) : nil;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_name release];
|
||||
[_object release];
|
||||
[_info release];
|
||||
RELEASE(_name);
|
||||
if (_object)
|
||||
RELEASE(_object);
|
||||
if (_info)
|
||||
RELEASE(_info);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -54,18 +56,14 @@
|
|||
object: object
|
||||
userInfo: info
|
||||
{
|
||||
return [[[self alloc] initWithName: name
|
||||
object: object
|
||||
userInfo: info]
|
||||
autorelease];
|
||||
return [[[self allocWithZone: NSDefaultMallocZone()] initWithName: name
|
||||
object: object userInfo: info] autorelease];
|
||||
}
|
||||
|
||||
+ notificationWithName: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
return [self notificationWithName: name
|
||||
object: object
|
||||
userInfo: nil];
|
||||
return [self notificationWithName: name object: object userInfo: nil];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue