I'm using this code to display the contacts in an app.
- (IBAction) selectContact:(id)sender {
ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
NSArray *displayedItems = [NSArray arrayWithObjects:[NSNumber numberWithInt:kABPersonAddressProperty], nil];
picker.displayedProperties = displayedItems;
[self presentModalViewController:picker animated:YES];
[picker release];
}
and there is a memory leak, according to instruments. Even if I cancel the person picker like this:
- (void) peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker {
NSLog(@"peoplePickerNavigationControllerDidCancel");
[self dismissModalViewControllerAnimated:YES];
}
... I got a leak:
I have found some posts of developers claiming that this is a bug in the SDK and that a bug has already been filed. Can someone confirm that? or point me in the right direction.