Minor performance improvements - don't send mesages to nil.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4214 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-05-06 19:36:54 +00:00
parent 20d88461fb
commit c18fe106ea
2 changed files with 15 additions and 8 deletions

View file

@ -57,7 +57,8 @@
rectangle = aRect;
tag = aTag;
owner = anObject;
[owner retain];
if (owner)
[owner retain];
user_data = theData;
inside = flag;
isValid = YES;
@ -66,7 +67,8 @@
- (void) dealloc
{
[owner release];
if (owner)
[owner release];
[super dealloc];
}
@ -105,8 +107,11 @@
if (isValid)
{
isValid = NO;
[owner release];
owner = nil;
if (owner)
{
[owner release];
owner = nil;
}
}
}