Objective C selector memory managment (does this leak memory)?

Posted by James Jones on Stack Overflow See other posts from Stack Overflow or by James Jones
Published on 2010-05-23T02:58:07Z Indexed on 2010/05/23 3:00 UTC
Read the original article Hit count: 480

- (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

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c