Surprising IPhone leak
- by Ethan
Hey guys,
So I'm running instruments on my app, and getting a leak that I could have sworn I was doing right.
+ (NSMutableArray *)decode:(NSDictionary *)encoded_faculty_array
{
NSArray *faculty_id_data = [encoded_faculty_array objectForKey:@"faculty_id"];
NSArray *faculty_first_name = [encoded_faculty_array objectForKey:@"first_name"];
NSArray *faculty_last_name = [encoded_faculty_array objectForKey:@"last_name"];
NSMutableArray* faculty_array = [[NSMutableArray alloc] init];
for(int a = 0; a < [faculty_id_data count]; a++)
{
Faculty *new_fac = [[Faculty alloc] initWithFacultyId:[Dearray clean:[faculty_id_data objectAtIndex:a] withDefault:@"0"]
andFirstName:[Dearray clean:[faculty_first_name objectAtIndex:a] withDefault:@"Name not found"]
andLastName:[Dearray clean:[faculty_last_name objectAtIndex:a] withDefault:@" "]
andBio:nil
andDegrees:nil
andTitle:nil];
[faculty_array addObject:new_fac];
[new_fac release];
}
[faculty_array autorelease];
return faculty_array;
}
It's reporting a leak on new_fac. I released it immediately after I called it though. Any idea what could be causing that problem?
Thanks.