I am importing a good amount of data into my application using Core Data like so:
for (int i = 0; i < [items count]; i++)
{
Client *entity = (Client*) [NSEntityDescription insertNewObjectForEntityForName:@"Client" inManagedObjectContext:managedObjectContext];
[entity setCompanyName:[[items objectAtIndex:i] objectForKey:@"CompanyName"]];
//* bunch of other fields
NSError *error;
if (![managedObjectContext save:&error]) {
// Handle the error.
NSLog(@"%@",error);
}
}
What do I need to be releasing here? should I be doing [entity release]?