Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix mem leak, EGOImageLoadConnection not releasing _responseData. htt…

  • Loading branch information...
commit e1e9b1902348f4bfd517d9f7079903b65d3b4a17 1 parent d732e28
@crumpf crumpf authored
View
1  Demo/Libraries/EGOImageLoader/EGOImageLoadConnection.m
@@ -90,6 +90,7 @@ - (void)dealloc {
self.delegate = nil;
[_connection release];
[_imageURL release];
+ [_responseData release];
[super dealloc];
}
View
3  Demo/Libraries/EGOImageLoader/EGOImageLoader.m
@@ -115,7 +115,7 @@ - (void)loadImageForURL:(NSURL*)aURL observer:(id<EGOImageLoaderObserver>)observ
- (UIImage*)imageForURL:(NSURL*)aURL shouldLoadWithObserver:(id<EGOImageLoaderObserver>)observer {
if(!aURL) return nil;
- id anImage = [[EGOCache currentCache] imageForKey:keyForURL(aURL)];
+ UIImage* anImage = [[EGOCache currentCache] imageForKey:keyForURL(aURL)];
if(anImage) {
return anImage;
@@ -152,7 +152,6 @@ - (void)imageLoadConnectionDidFinishLoading:(EGOImageLoadConnection *)connection
[[NSNotificationCenter defaultCenter] performSelectorOnMainThread:@selector(postNotification:) withObject:notification waitUntilDone:YES];
} else {
-
[[EGOCache currentCache] setData:connection.responseData forKey:keyForURL(connection.imageURL) withTimeoutInterval:604800];
[currentConnections removeObjectForKey:connection.imageURL];
Please sign in to comment.
Something went wrong with that request. Please try again.