我们在研发的过程中,为了避免循环引用常常会用weak若饮用来打破循环链
__weak typeof(self) weakSelf = self;
但是有时候,在异步多任务的时候,为了避免weakself
提前被释放,需要配合
__strong typeof(self) strongSelf = weakSelf;
__weak __typeof__(self) weakSelf = self;
dispatch_group_async(_operationsGroup, _operationsQueue, ^
{
__typeof__(self) strongSelf = weakSelf;
[strongSelf doSomething];
[strongSelf doSomethingElse];
} );