【发布时间】:2013-10-07 16:04:38
【问题描述】:
我有一个创建 ABRecordRef、设置其属性并返回 ref 的方法。
我在使用 CFAutoRelease 时遇到了崩溃,因为我需要支持 iOS
-(ABRecordRef) myRecord{
ABRecordRef newRecord = ABPersonCreate();
//some setting here
return CFAutoRelease(newRecord); //how to release here?
}
【问题讨论】:
-
没有
CFAutoRelease。 -
显然有,在 10.9 和 iOS 7 中。(我也不知道。)
-
TIL。它尚未记录在案,但在 iOS 7 API 差异中提到:developer.apple.com/library/ios/releasenotes/General/…
-
查看 Mike Ash 关于这个主题的最新博文。
标签: iphone ios objective-c core-foundation