I'm trying to access just the email ID's of contacts and since there could be multiple emails, I'm using ABMultiValueRef
Here's my code:
- (BOOL)peoplePickerNavigationController: (ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson

ABRecordRef)pe rson
property

ABPropertyID)property identifier

ABMultiValueIdentifier)identifier{
ABMultiValueRef emails = ABRecordCopyValue(person, property);
CFStringRef emailID = ABMultiValueCopyValueAtIndex(emails, identifier);
[self AddEmployeeEmail

NSString*)emailID ];
[self dismissModalViewControllerAnimated:YES];
return NO;
}
If I run this code through Leaks, it complains about a memory leak which i could resolve by '[emails release]', but this gives me a compiler warning. I've seen some posts about certain leaks happening on the simulator but not on the device. Could this be one of them??
Any suggestions ??