如果我从某个块内部调用的函数引用了 'self',那么这会创建一个保留循环吗?
__weak id weakSelf = self;
- (void)firstFunction
{
id strongSelf = weakSelf;
if (!strongSelf) return;
[anObject performBlock:^{
[strongSelf secondFunction];
}];
}
- (void)secondFunction
{
[self doSomeCrazyStuff];
self.counter++;
//etc.
}
我在'secondFunction'中调用了'self',我需要将我的弱指针传递到这个函数中并使用它吗?