- __weak typeof(self)weakSelf=self;
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- __strong typeof(weakSelf)strongSelf=weakSelf;
- [strongSelf doSomething];
- });
防止Block的循环引用 weakself strongself
最新推荐文章于 2020-06-23 18:54:58 发布