I am simply loading a plist into a temporary dictionary for initializing my data model. Unfortunately this single line of code below results in consistent leak throughout the app life cycle as per Instruments. The leaked objects being
NSCFString and GeneralBlock on a Malloc and the responsible library being Foundations.
My two questions for the experienced eyes:
- Am I doing something strange to trigger this ? I tried surrounding it in autorelease block but it had no effect.
- Is there a way to print list of object references of a suspect object to get insight into the object orphaning process.
NSDictionary *tempDict = [NSDictionary dictionaryWithContentsOfFile: [[NSBundle mainBundle] pathForResource:resourceName ofType:@"plist"]]; totalChapters = [[tempDict objectForKey:@"NumberOfChapters"] intValue]; chapterList = [[NSMutableArray alloc] initWithCapacity: totalChapters]; [chapterList addObjectsFromArray:[tempDict objectForKey:@"Chapters"]];