Created
April 6, 2012 23:01
-
-
Save bogardon/2323766 to your computer and use it in GitHub Desktop.
NSCachedURLResponse data leak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.organicshoppermag.com/assets/images/miso_img_large.gif"]]; | |
NSURLResponse *response = nil; | |
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:NULL]; | |
NSCachedURLResponse *cachedResponse = [[[NSCachedURLResponse alloc] initWithResponse:response data:data] autorelease]; | |
NSLog(@"%u",cachedResponse.data.length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment