AFNetworking/AFNetworking — Issue #137: AFHTTPRequestOperation - hasAcceptableStatusCode in completionBlock
Author: kazzar
Created: 2011-12-01 10:36:12+00:00
State: open

Hi all
i have a little problem with AFHTTPRequestOperation with arc.
I use snipped found in project page, and i have a warning here:

AFHTTPRequestOperation *operation = [[[AFHTTPRequestOperation alloc] initWithRequest:request] autorelease];
operation.completionBlock = ^ {
if ([operation hasAcceptableStatusCode]) { *// Warning here
NSLog(@"Friend Request Sent");
} else {
NSLog(@"[Error]: (%@ %@) %@", [operation.request HTTPMethod], [[operation.request URL] relativePath], operation.error);
}
};

the warning says: "Capturing ''operation' strongly in this block is likely to lead to a retain cycle"

sorry for my bad english
thx for great work!
Dario