views:

64

answers:

1

Hi Guys,

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 setShouldProcessNamespaces:NO];
  [myParser setShouldReportNamespacePrefixes:NO];
  [myParser setShouldResolveExternalEntities:NO];
  [myParser parse];
  [myParser release];
}
A: 

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.

Williham Totland
-(TrackDetails *)gettrackDetails:(NSString*)trackId;{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSString *surl=[NSString stringWithFormat: trackDetailsUrlFormat,[trackId UTF8String]]; surl = [surl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; [xmlParserForTrackDetails parseXMLFileAtURL:[NSURL URLWithString:surl]]; trackDetials =[xmlParserForTrackDetails gettrackDetails]; [pool release]; return trackDetials; }I am calling that parser from here
Madan Mohan