如果块内的代码调用了一个方法,如果该方法引用了self,是否存在retain循环?换句话说,一个块下游的所有代码都需要使用weakSelf/strongSelf模式吗?
例如:
__weak __typeof__(self) weakSelf = self;
Myblock block = ^{
[weakSelf doSomething];
};
. . .
- (void)doSomething
{
self.myProperty = 5; // Is this ok or does it need to use a weakSelf?
}