- (void)submitRequest:(NSMutableDictionary *)dictionary
{
__weak MyClass *weakSelf = self;
[[API sharedInstance] commandWithParams:dictionary
onCompletion:^(NSDictionary *json) {
if (!_canceled) {
[weakSelf.delegate receivedRequest:json];
}
}];
}
Your Block captures self
, so you may get a retain cycle. Use a weak reference to avoid that.