block 中循环引用的问题
来源:互联网 发布:photoshop加密软件 编辑:程序博客网 时间:2024/05/29 11:04
#pragma mark -- 循环引用 //----------------------------------------------------------------------------------------------------
/*
某些block中,使用self会造成循环引用
__weak AppDelegate *weakSelf = self;
dispatch_async(mainQueue, ^(void) {
AppDelegate *strongSelf = weakSelf;
if (strongSelf != nil){
[strongSelf.myTimer invalidate];
[[UIApplication sharedApplication] endBackgroundTask:self.backgroundTaskIdentifier];
strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid;
}
});
__unsafe_unretained contentsViewController* yqContentsViewController = self;
[_threeView reminderBlock:^{
[_alertView setMessage:@"本章节内容暂时为空"];
[_alertView show];
[NSTimer scheduledTimerWithTimeInterval:1.0f target:yqContentsViewController selector:@selector(alertDismissed) userInfo:nil repeats:NO];
}];
*/
- block 中循环引用的问题
- iOS中Block的循环引用问题
- iOS中block的循环引用问题
- block 循环引用的问题
- Block的循环引用问题
- Block的循环引用问题
- block的循环引用问题
- Block的循环引用问题
- Block的引用循环问题
- block循环引用的问题
- Objective-c中block使用时的循环引用问题
- iOS 中关于block 的循环引用问题
- 8.block中使用self的循环引用问题
- iOS中Block的引用循环问题 (ARC & non-ARC)
- iOS 解决block中self的循环引用问题
- 实际开发中-Block导致循环引用的问题
- Block 代码块中循环引用问题
- block循环引用问题
- 指数哥伦布码
- 出色的展厅设计为企业形象增光添彩
- mysql导入sql数据库提示。您可能正在上传很大的文件,请参考文档来寻找解决方法
- Uva - 1572 - Self-Assembly
- eclipse插件explorer安装使用
- block 中循环引用的问题
- Android out of memory 彻底解决Android因加载多个大图引起的OutOfMemoryError,内存溢出的问题
- 原型设计工具
- 多线程06-(sdwebimage 总结3)
- 面试总结
- IPV6
- Core Java 笔记(三) - 反射
- iOS 中^block 示例
- 如何辨别美国私立高中优劣程度