1.避免self 被循环引用
__weak typeof(self) weakSelf = self;//
self.myblock=^{
__strong typeof(self) strongSelf = weakSelf;//加一下强引用,避免weakSelf被释放掉
NSLog(@"%@--\n%@",name,strongSelf.dataArray);
};
理解不够,后期再修改添加
1.避免self 被循环引用
__weak typeof(self) weakSelf = self;//
self.myblock=^{
__strong typeof(self) strongSelf = weakSelf;//加一下强引用,避免weakSelf被释放掉
NSLog(@"%@--\n%@",name,strongSelf.dataArray);
};
理解不够,后期再修改添加
转载于:https://my.oschina.net/lkeageer/blog/734552