Skip to content

Commit

Permalink
Fix a memory leak in the new delegate calling code - we were leaking …
Browse files Browse the repository at this point in the history
…ourselves if the delegate was removed before we called it.
  • Loading branch information
jogu authored and pokeb committed Jul 17, 2010
1 parent fbb835a commit 162ca98
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Classes/ASIHTTPRequest.m
Expand Up @@ -1575,10 +1575,7 @@ - (void)callSelectorCallback:(SEL *)selectorPtr withTarget:(id *)targetPtr
id target = *targetPtr;
SEL selector = *selectorPtr;

if (!selector || !target)
return;

if ([target respondsToSelector:selector])
if (selector && target && [target respondsToSelector:selector])
{
[target performSelector:selector withObject:self];
}
Expand Down

0 comments on commit 162ca98

Please sign in to comment.