Closed cri1682 closed 11 years ago
I'm getting this warning if i call "self" inside the completion block or the error block, something like
conn.errorBlock = ^(NSError *error) { if (error.code!=4 ) { UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"error" message:@"" delegate:self cancelButtonTitle:@"close" otherButtonTitles:nil]; [alert show]; } };
The warning is attached on "delegate:self". The warning disappear if i declare a weak reference to "self"
__weak MyDataProcessor *dp = self;
Maybe you can prevent those warnings by an intervention in the library?
Unfortunately, I don't think I can do anything.
Capturing a weak self as you do is, according to Apple, a "best practice":
https://developer.apple.com/library/ios/documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
I'm getting this warning if i call "self" inside the completion block or the error block, something like
The warning is attached on "delegate:self". The warning disappear if i declare a weak reference to "self"
Maybe you can prevent those warnings by an intervention in the library?