FYI:
I got confirmation from Apple today that this is a known issue. Bug
ID# 6824585
Using NSData dataWithContentsOfURL: causes a NSConcreteData leak:
- (void) getImageForUrl:(NSURL *)imageURL {
NSData *data = [NSData dataWithContentsOfURL:imageURL];
}
Workaround: This has no leak:
NSData *data = [NSData dataWithContentsOfURL:imageURL options:
(NSUInteger) nil error:nil];
The initWithContentsOfURL: has the same problem.
---------- Forwarded message ----------
From: M Jethwa <
milesh.jet...@googlemail.com>
Date: Sep 5, 5:37 am
Subject: Leak with NSDictionary
To: iPhone Application Development Auditors
Hi,
Is this one of the Presence assignments that shows a list of people
with a picture?
I get a NSConcreteData leak when I attempt to load shaq's picture from
the URL (in Stanford's JSON data) to NSData. Stanford's data is a bit
out of date. (TwitterHelper has a switch that by default loads data
from Stanford's test server so that you do not hit any request limit
problems with Twitter).
If I type the picture URL in a browser it returns some XML instead of
a picture and this maybe catches out the NSData method to load from a
URL.
But that is the only leak I get and the NSData object remains 'nil'
and any further actions on it do not error.
--
You received this message because you are subscribed to the Google
Groups "iPhone Application Development Auditors" group.
To post to this group, send email to
iphone-appd...@googlegroups.com.
To unsubscribe from this group, send email to
iphone-appdev-aud...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/iphone-appdev-auditors?hl=en.