I’m using ARC and getting a warning saying Capturing 'request' strongly in this block is likely to a retain cycle.
__block ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url];
[request setCompletionBlock:^{
NSString *responseString = [request responseString];
self.appointmentArray = [responseString JSONValue];
}];
[request setFailedBlock:^{
NSError *error = [request error];
NSLog(@"%@", error.description);
}];
I’m assuming
requestis declared somewhere before the blocks. You need to declare it as__weak, or set a second, weakly-declared variable to it.This question is similar. Try this: