Je suis confondu avec bridge et bridge_transfer, est-ce correct?
-(void)getData{
ABAddressBookRef addressBook = ABAddressBookCreate();
NSArray *allPeople = (__bridge_transfer NSArray*)ABAddressBookCopyArrayOfAllPeople(addressBook);
NSString *name;
for ( int i = 0; i < [allPeople count]; i++ )
{
name = (__bridge_transfer NSString *) ABRecordCopyValue((__bridge ABRecordRef)[allPeople objectAtIndex:i], kABPersonFirstNameProperty);
}
CFRelease(addressBook);
allPeople = nil;
}
Y a-t-il quelqu'un qui peut m'expliquer comment les utiliser?