Permalink
Browse files

Fix potential memory leak of the test connection.

  • Loading branch information...
1 parent f042c50 commit 99dce1358e2da4798f57f739f2202e052ba96b3a @jum committed Nov 22, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 Appirater.m
View
@@ -87,7 +87,9 @@ - (BOOL)connectedToNetwork {
NSURLRequest *testRequest = [NSURLRequest requestWithURL:testURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:20.0];
NSURLConnection *testConnection = [[NSURLConnection alloc] initWithRequest:testRequest delegate:self];
- return ((isReachable && !needsConnection) || nonWiFi) ? (testConnection ? YES : NO) : NO;
+ BOOL ret = ((isReachable && !needsConnection) || nonWiFi) ? (testConnection ? YES : NO) : NO;
+ [testConnection release];
+ return ret;
}
+ (Appirater*)sharedInstance {

0 comments on commit 99dce13

Please sign in to comment.