私は自分のプロジェクトでARCを使用していますが、潜在的なメモリリーク(コメント行参照)が警告されています。どのようにそれを処理するか分からない。people ARCを使用したピッカーメモリリーク
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{
ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
// Call to function 'ABRecordCopyValue' returns a Core Foundation object with a +1 retain count
int idx = ABMultiValueGetIndexForIdentifier (phoneProperty, identifier);
emailToValue= (__bridge_transfer NSString *)ABMultiValueCopyValueAtIndex(phoneProperty,idx);
// Object Leaked: object allocated and stored into 'phoneProperty' is not referenced later in this execution path and has a retain count of +1
アドバイスをいただければ幸いです。
ありがとうございます。そうphoneProperty
ABRecordCopyValue
によって返されたARCは唯一のObjective-Cのオブジェクトのためのメモリを管理