im building an app which grabs all the contacts from iPhone book and filter it my names having only emails. i use the following function for that (filtering with names having email address)
- (long)personRecord:(ABRecordRef)paramPerson{
if(paramPerson == nil){
NSLog(@"The given Person is Null");
}
ABMutableMultiValueRef emails = ABRecordCopyValue(paramPerson, kABPersonEmailProperty);
if(emails == nil){
return 0;
}
NSLog(@"%ld",ABMultiValueGetCount(emails));
// return (ABMultiValueGetCount(emails));
return (ABMultiValueGetCount(emails));
}
When analysed I'm geting potential leak
how can i resolve this Leak ....????