自动引用计数预处理器

发布于 2025-01-05 20:20:03 字数 81 浏览 4 评论 0原文

启用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

许久 2025-01-12 20:20:03

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文