【发布时间】:2015-04-21 13:16:05
【问题描述】:
这个block会不会导致内存泄漏问题,因为我没有使用weakified sell:
[KNApi getCouponsWithSearchString:self.searchString withCouponsCount:self.coupons.count withSuccess:^(id object) {
[self.coupons addObjectsFromArray:object[@"items"]];
[self.hud hide:YES];
[self.theTableView setHidden:NO];
[self.theTableView reloadData];
} withFailure:^(id object) {
[self hideLoadingIndicatorWithError:object];
}];
例如,我知道如果我们将 [KNApi getCouponsWithSearchString... 作为 self 类中的块属性,那么它会导致问题。
因此假设我们的堆栈将被销毁,并且在此之前我将获得成功的调用。它会导致请求自身出现问题吗?
【问题讨论】:
-
@JakubVano,谢谢伙计,我想我以前读过它,但你链接这些答案真的很有帮助!!!
标签: ios ios7 ios5 objective-c-blocks