避免block中循环引用,内存释放不了的问题,规范编码很重要。相对来说,在block中操作self时,正确的使用姿势。 1 BlockManager *bm = [BlockManager sharedInstance];2 3 __weak typeof(self) weakSelf = self;4 [bm doSomethingWithBlock:^NSString *(NSInteger value) {5 __strong typeof(weakSelf) strongSelf = weakSelf; //不能缺少 6if (strongSelf) {7 NSLog(@"%@", strongSelf.array[7]);8 [strongS...