2
我接近我的項目結束,儘管它表明我的XCode分析我的項目有在該行內存泄漏後:XCode的內存泄漏問題
這裏是相關代碼的文字版:
- (void)displayPerson:(ABRecordRef)person
{
NSString* firstName = (__bridge_transfer NSString*)ABRecordCopyValue(person, kABPersonFirstNameProperty);
NSString *lastName = (__bridge_transfer NSString*)ABRecordCopyValue(person, kABPersonLastNameProperty);
NSMutableString *fullName = [NSString stringWithFormat:@"%@ %@", firstName, lastName];
//NSLog(@"%@", fullName);
NSString* phoneNum = nil;
ABMultiValueRef phoneNumbers;
phoneNumbers = ABRecordCopyValue(person,
kABPersonPhoneProperty);
if (ABMultiValueGetCount(phoneNumbers) > 0) {
phoneNum = (__bridge_transfer NSString*) ABMultiValueCopyValueAtIndex(phoneNumbers, 0);
} else {
phoneNum = @"Unknown";
}
NSLog(@"First name is %@ and last name is %@", firstName, lastName);
NSLog(@"Phone is %@", phoneNum);
phoneNum = [phoneNum stringByReplacingOccurrencesOfString:@"(" withString:@""];
phoneNum = [phoneNum stringByReplacingOccurrencesOfString:@")" withString:@""];
任何人都可以幫我解決這個問題嗎?我不認爲這是癱瘓的,但我不想讓蘋果有理由拒絕我的應用程序從商店。謝謝。
最佳... SL
非常感謝你的快速和正確的反應。一旦網站允許我將這個標記爲正確的...... – Skyler