KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In ARC enabled code, how to fix a warning about a potential retain cycle, when using a block-based API? The warning: Capturing 'request' strongly in this block is likely to lead to a retain cycle produced by this snippet of code: ASIHTTPRequest *request = [[ASIHTTPRequest alloc] initWithURL:... [request setCompletionBlock:^{ NSDictionary *jsonDictionary = [[CJSONDeserializer deserializer] deserialize:request.rawResponseData error:nil]; // ... }]; Warning is linked to the use of the object request inside the block.
Tags (comma-separated)
Save Edits
Cancel