Permalink
Browse files

Merge pull request #7 from jeethu/memleak-fix

Changed 3 __bridge casts to __bridge_transfer. Added "’s" to stringsToStrip.
  • Loading branch information...
jakeboxer committed Aug 1, 2012
2 parents 3c499a6 + 00ccbf9 commit 29cb38bb06bf7084459555d0f682a415015a8c10
Showing with 3 additions and 3 deletions.
  1. +3 −3 JBDeviceOwner/JBDeviceOwner.m
@@ -80,15 +80,15 @@ - (id)initWithDevice:(UIDevice *)aDevice {
- (void)populateFromAddressBook {
ABAddressBookRef addressBook = ABAddressBookCreate();
- NSArray *people = (__bridge NSArray *)ABAddressBookCopyPeopleWithName(addressBook, (__bridge CFStringRef)self.fullName);
+ NSArray *people = (__bridge_transfer NSArray *)ABAddressBookCopyPeopleWithName(addressBook, (__bridge CFStringRef)self.fullName);
self.hasAddressBookMatch = ([people count] > 0);
if (self.hasAddressBookMatch) {
ABRecordRef owner = (__bridge ABRecordRef)[people objectAtIndex:0];
// Email
ABMultiValueRef emailMultiValue = ABRecordCopyValue(owner, kABPersonEmailProperty);
- NSArray *emails = (__bridge NSArray *)ABMultiValueCopyArrayOfAllValues(emailMultiValue);
+ NSArray *emails = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(emailMultiValue);
if ([emails count] > 0) {
self.email = (NSString *)[emails objectAtIndex:0];
@@ -98,7 +98,7 @@ - (void)populateFromAddressBook {
// Phone
ABMultiValueRef phoneMultiValue = ABRecordCopyValue(owner, kABPersonPhoneProperty);
- NSArray *phones = (__bridge NSArray *)ABMultiValueCopyArrayOfAllValues(phoneMultiValue);
+ NSArray *phones = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(phoneMultiValue);
if ([phones count] > 0) {
self.phone = (NSString *)[phones objectAtIndex:0];

0 comments on commit 29cb38b

Please sign in to comment.