Do methods called from within a block need to use weakSelf?
问题 If the code inside a block calls a method, will a retain cycle exist if that method references self? In other words, does all code downstream of a block need to use the weakSelf/strongSelf pattern? For example: __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? } 回答1: Retain cycle will be triggered only if you retain self inside the block. Otherwise it will