- (IBAction) someButtonCall {
if(!someCondition) {
someButtonCallBack = @selector(someButtonCall);
[self presentModalViewController:someController animated:YES];
} else
...
}
//Called from someController
- (void) someControllerFinished:(BOOL) ok {
[self dismissModalViewControllerAnimated:YES];
if(ok) [self performSelector:someButtonCallBack];
else ...
}
I’m wondering if the user keeps getting into the !someCondition clause if the selector is leaked by assigning a new selector each time (the code above is hypothetical and not what i’m doing).
Any help is appreciated.
Thanks,
James Jones
No, this doesn’t leak anything – you don’t own the
SELvalues returned by@selector()andsel_registerName(), the Objective-C runtime does.