I have a method and don't use ARC:
-(void)readAppPlist
{
NSString *plistPath = [self getDataFileDestinationPath];
NSData *plistXML = [[NSFileManager defaultManager] contentsAtPath:plistPath];
NSString *errorDesc = nil;
NSPropertyListFormat format;
NSMutableDictionary *temp = (NSMutableDictionary *) [NSPropertyListSerialization propertyListFromData:plistXML mutabilityOption:NSPropertyListMutableContainersAndLeaves format:&format errorDescription:&errorDesc];
if (!temp) {
NSLog(@"Error reading plist: %@, formatL %d", errorDesc, format);
}
items = [[temp objectForKey:@"Items"] mutableCopy];
}
According to the rules of memory management where do I need to release the memory for the variables plistPath, plistXML, errorDesc, temp? Shall I writh another one method, release them here or just put them into the dealloc global method for this class?