Objective-C memory leak in loading remote content

Posted by Ican Zilb on Stack Overflow See other posts from Stack Overflow or by Ican Zilb
Published on 2010-05-22T11:57:51Z Indexed on 2010/05/22 12:00 UTC
Read the original article Hit count: 387

I try to load a plist file from my server. I can think of 2 ways to do that, but for both Instruments says there's huge memory leak :

NSData* plistData = [NSData dataWithContentsOfURL:url];

and

NSDictionary* updateDigest = [NSDictionary dictionaryWithContentsOfURL: [NSURL URLWithString:updateURL] ];

The backtrace of the memory leak leads to __CFURLCache in CFNetwork and I am wondering if something can be done to fix the leak? Any other way to load a remote plist xml, without the memory leakage ?

Thanks

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about memory-leaks