过渡到 ARC 的工具

发布于 2024-12-28 11:12:55 字数 547 浏览 3 评论 0原文

我想将我的应用程序转换为 ARC。我可以将Objective-C自动引用计数更改为YES,但这不会自动删除releases retains等。

​href="https://developer.apple.com/library/archive/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011226" rel="nofollow noreferrer">过渡到ARC 发行说明 指出:

Xcode 有一个新工具,可以自动执行 ARC 转换的机械部分(例如删除保留和释放调用),并帮助您解决迁移器无法自动处理的问题。迁移工具将项目中的所有文件转换为使用 ARC。如果对某些文件使用手动引用计数更方便,您还可以选择基于每个文件使用 ARC。

如何在 Xcode 中调用这个工具?

I want to transition my App to ARC. I can change Objective-C Automatic Reference Counting to YES but that does not automatically remove releases retains etc.

The Transitioning to ARC Release Notes states:

Xcode has a new tool that automates the mechanical parts of the ARC conversion (such as removing retain and release calls) and helps you to fix issues the migrator can’t handle automatically. The migration tool converts all files in a project to use ARC. You can also choose to use ARC on a per-file basis if it’s more convenient for you to use manual reference counting for some files.

How do I invoke this tool in Xcode?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

柏拉图鍀咏恒 2025-01-04 11:12:55

天哪,我刚刚找到它:

转换> 到 Objective-C ARC

我首先检查了 Xcode 的帮助,但找不到它。

输入图片此处描述

Oh man I just found it:

Convert > To Objective-C ARC

I checked in Xcode's help first where I could not find it.

enter image description here

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