1
ここでは私のコードです:「名前」に格納されたオブジェクトの潜在的なリーク
[ NSUInteger peopleCounter = 0; //set a initial value as ZERO.
//Create custom Contacts list
for (peopleCounter = 0; peopleCounter < [arrayOfAllPeople count]; peopleCounter++) {
ABRecordRef thisPerson = (__bridge ABRecordRef) [arrayOfAllPeople objectAtIndex:peopleCounter]; // get every person record one by one.
NSString *name = (__bridge NSString *) ABRecordCopyCompositeName(thisPerson); //get a person name
ABMultiValueRef number = ABRecordCopyValue(thisPerson, kABPersonPhoneProperty); //get a person number
//optimize a phone numbers
for (NSUInteger emailCounter = 0; emailCounter < ABMultiValueGetCount(number); emailCounter++) {
NSString *email = (__bridge NSString *)ABMultiValueCopyValueAtIndex(number, emailCounter);
][1]