NSConcreteData leaked object in objective c?
I am getting the NSConcreteData leaked object while testing the leaks in the instruments.It showing in the parser,
- (void)parseXMLFileAtURL:(NSURL *)URL
{
[urlList release];
urlList = [[NSMutableArray alloc] init];
myParser = [[NSXMLParser alloc] initWithContentsOfURL:URL] ;// it showing this line as leaking
[myParser setDelegate:self];
[myParser setShouldP开发者_如何学编程rocessNamespaces:NO];
[myParser setShouldReportNamespacePrefixes:NO];
[myParser setShouldResolveExternalEntities:NO];
[myParser parse];
[myParser release];
}
That is extremely unlikely to be the source of the leak, since you're not using NSData around there, like, at all. You might want to see where that URL comes from.
Edit: It might be nice if you edit your original post with the new information, but nonetheless; insofar as I can see, that code shouldn't leak. This kind of error can be tedious to track down; and the NSConcreteData
might be a red herring, but I'm thinking you should look for your uses of NSData
throughout your project.
精彩评论