Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blocks and self from called method

Tags:

Ok, so I understand how to avoid self retain cycles with blocks, how about cases when I send a message to self from a method within a block nested deeper in call stack like this:

- (void)methodA {
    __block MyClass *blockSelf = self;
    [someObject block:^{
        [blockSelf methodB];
    }];
}

- (void)methodB {
    ...
    [self methodC];
    ...
}

- (void)methodC {
}

In this case [blockSelf methodB] is fine, but is sending [self methodC] from methodB causing retain cycle or not? Can't find the answer anywhere...