在arc开发环境下用ASIHttpRequest,采用block的方式回调http响应时,会出现block will be retained by the captured object的warning.
解决方法是在声明前加__unsafe_unretained
如:
NSURL *url = [NSURL URLWithString:WEB_SERVICE];
__unsafe_unretained __block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
这样可以同时支持iOS4,因为iOS4不能用__weak.
reference:http://article.ityran.com/archives/1221