ABMultiValueRef phones = ABRecordCopyValue(ref, kABPersonPhoneProperty);
if ( phones ) {
for(int i=0;i<ABMultiValueGetCount(phones);i++) {
NSString* label=(NSString*)ABMultiValueCopyLabelAtIndex(phones, i);
CFRelease ((CFTypeRef)label);
CFRelease ((CFTypeRef)label);
}
}
CFRelease(phones);
Why label can be released twice without any error? but phones cannot. Any memory leak if not release label for twice?
I had run above code successfully in xcode4 simulator 4.3