I came across the same problem as follow myself:
"Check if delegate still exists before calling respondsToSelector"
When using AsyncImageView with ASIHttpRequest, and the tableView mechanism I used somehow leads to the delegate of asihttprequest, i.e. the asyncImageView, was released before RequestFinished.
So the following functions in ASIHTTPRequest.m:
- (void)requestFinished;
- (void)reportFailure;....
with " if (delegate && [delegate respondsToSelector:didFinishSelector])" will come to crash because of a invalid delegate.
Notice that if(delegate) or if(delegate!=nil) won't do any help.
According to a discussion on
https://github.com/pokeb/asi-http-request/issues/168
It is safer to use blocks to solve this problem.
Use request setCompletionBlock:^(void){} rather than the default - (void) requestFinished:(ASIHTTPRequest *)request.