From a0e88c85820ccf698f10a6390569d40a448ca377 Mon Sep 17 00:00:00 2001 From: Wang Hailong Date: Tue, 22 Oct 2013 00:27:23 +0800 Subject: [PATCH] 1.Adjust format 2.add releaseBlocksOnMainThread when dealloc --- Classes/ASIHTTPRequest.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/ASIHTTPRequest.m b/Classes/ASIHTTPRequest.m index 6e3da770..ddc88a27 100644 --- a/Classes/ASIHTTPRequest.m +++ b/Classes/ASIHTTPRequest.m @@ -407,6 +407,9 @@ - (void)dealloc } [self cancelLoad]; [_statusTimer invalidate]; +#if NS_BLOCKS_AVAILABLE + [self releaseBlocksOnMainThread]; +#endif } #if NS_BLOCKS_AVAILABLE @@ -1211,8 +1214,7 @@ - (void)startRequest kCFNull,kCFStreamSSLPeerName, nil]; - CFReadStreamSetProperty((__bridge CFReadStreamRef)[self readStream], kCFStreamPropertySSLSettings, - (__bridge CFTypeRef)sslProperties); + CFReadStreamSetProperty((__bridge CFReadStreamRef)[self readStream], kCFStreamPropertySSLSettings, (__bridge CFTypeRef)sslProperties); } // Tell CFNetwork to use a client certificate @@ -1948,7 +1950,7 @@ - (void)requestReceivedResponseHeaders:(NSMutableDictionary *)newResponseHeaders if (_delegate && [_delegate respondsToSelector:_didReceiveResponseHeadersSelector]) { ASISuppressPerformSelectorLeakWarning( - [_delegate performSelector:_didReceiveResponseHeadersSelector withObject:self withObject:newResponseHeaders]; + [_delegate performSelector:_didReceiveResponseHeadersSelector withObject:self withObject:newResponseHeaders]; ); }