Objective C selector memory managment (does this leak memory)?
- by James Jones
- (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