如何修复iOS分析问题,例如"存储在"中的对象的潜在泄漏。
CODE
ABMultiValueRef email = ABRecordCopyValue(person, kABPersonEmailProperty);
txtEmail.text = ( NSString*)CFBridgingRelease(ABMultiValueCopyValueAtIndex(email, 0));
ABMultiValueRef multi = ABRecordCopyValue(person, kABPersonPhoneProperty);
txtTelel.text = ( NSString*)CFBridgingRelease(ABMultiValueCopyValueAtIndex(multi, 0));
答案 0 :(得分:1)
试试这个:
ABMultiValueRef email = ABRecordCopyValue(person, kABPersonEmailProperty);
txtEmail.text = ( NSString*)CFBridgingRelease(ABMultiValueCopyValueAtIndex(email, 0));
CFRelease(email);
ABMultiValueRef multi = ABRecordCopyValue(person, kABPersonPhoneProperty);
txtTelel.text = ( NSString*)CFBridgingRelease(ABMultiValueCopyValueAtIndex(multi, 0));
CFRelease(multi);