need to release NSURL* url;
added the release after it was used. this seems to stop the leak.
Code: Select all
doc = [[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:&error];
[url release];
Code: Select all
doc = [[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:&error];
[url release];
I must agree with this. Clang exposes some potentially dangerous code paths.cBroadbo wrote:While you are fixing this for the next release, I would suggest running CLANG (Build/Build & Analyze) in the latest version of xCode. It found this leak and a handful of variables possibly being used without being initialized.