0
我已经通过方法作为块,我的功能是这样的。iOS块成为僵尸
- (void)setPhoneNumber:(NSString *)phoneNo andView:(UIView *)view andSuccessBlock:(void (^)(id responseObject))successBlock andFailureBlock:(void (^)(NSString *errorMsg, NSInteger errorCode, AFHTTPRequestOperation *operation, NSError *error))failureBlock {
}
我打电话是这样的。
[[WSHelper sharedInstance] setPhoneNumber:phoneNumber andView:nil andSuccessBlock:^(id responseObject) {
} andFailureBlock:^(NSString *errorMsg, NSInteger errorCode, AFHTTPRequestOperation *operation, NSError *error) {
}];
问题是,当我检查successBlock,它被释放(我正在使用弧,不应该像那样释放)。我试过typedef,也不行。在我的其他项目中,这工作正常,但只在这里,这是不好的。我该如何解决?
(LLDB)PO successBlock
0x00000001078063c0
让我检查一下。希望它能解决。 –