自动引用计数预处理器
启用 ARC 后,预处理器不应该插入保留/释放/自动释放调用吗?
当我让 Xcode 生成一个预处理文件时,这些文件都没有显示出来?
With ARC enabled, shouldn't the Preprocessor insert retain/release/autorelease calls?
When I let Xcode generate a preprocessed file, none of those show up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ARC 发生在与 C 预处理器不同的级别。当 C 预处理器运行时,没有足够的信息来确定在哪里放置保留/释放调用,因为预处理器只是一个文本替换过程。
ARC happens at a different level than the C preprocessor. At the time the C preprocessor runs, there isn't enough information to determine where to place the retain/release calls, because the preprocessor is just a textual substitution pass.