The following leaks:
CFStringRef labelName = ABAddressBookCopyLocalizedLabel(ABMultiValueCopyLabelAtIndex(aMultiRef, indexPath.row));
cell.textLabel.text = (NSString *)labelName;
CFRelease(labelName);
I wonder if there is a way to rewrite it so that it doesnβt leak without a break and assignment ABMultiValueCopyLabelAtIndex(aMultiRef, indexPath.row)to CFStringRef, which then I need to manually CFRelease2 lines later? Of course, itβs not very important to do just that ... Iβm just curious.
Edit: Does it work CFAutoRelease? see my comment below
source
share