开发者

Does ABPersonViewController CFRetain its displayedPerson ABRecordRef?

开发者 https://www.devze.com 2022-12-17 06:42 出处:网络
ABRecordRef addressBookRecord = ...; ABNewPersonViewController *newPersonViewController = [[[ABNewPersonViewController alloc] init] autorelease];
ABRecordRef addressBookRecord = ...;
ABNewPersonViewController *newPersonViewController = [[[ABNewPersonViewController alloc] init] autorelease];
newPersonViewController.newPersonViewDelegate = delegate;
newPersonViewController.displayedP开发者_Go百科erson = addressBookRecord;

Is it safe to

CFRelease(addressBookRecord);

?

Is there a standard CoreFoundation pattern around this I'm not aware of?


I don't think it's safe to call CFRelease.
displayedPerson is defined as follows in the header.
So, displayedPerson is just assigned and not copied or retained when we set the value.
Therefore, I think we can't release it.

@property(nonatomic, readwrite) ABRecordRef displayedPerson
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号