我的项目中有以下代码
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
[popContactsForm dismissPopoverAnimated:YES];
[ssemailvc setName: (NSString *)ABRecordCopyValue(person,kABPersonFirstNameProperty)];
ABMultiValueRef emails = (NSString *)ABRecordCopyValue(person,kABPersonEmailProperty);
if (ABMultiValueGetCount(emails)>0) {
[ssemailvc setEmail:(NSString *)ABMultiValueCopyValueAtIndex(emails,0)];
}else [ssemailvc setEmail:@""];
CFRelease(emails);
[peoplePicker dismissModalViewControllerAnimated:YES];
[popEmailForm setPopoverContentSize:CGSizeMake(350.0, 225.0)];
return NO;
}
我收到以下警告
1.调用函数'ABRecordCopyValue'返回一个核心基础对象,保留计数为+1 2.对象泄漏:分配的对象在执行后期未引用,保留计数为+1
请告诉我如何克服这个问题