Xcode 中的静默错误

发布于 2024-12-20 10:03:38 字数 317 浏览 5 评论 0原文

我最近将我的项目转换为使用 ARC(自动引用计数)。

它并不能真正很好地了解何时实际释放对象,并且通常因为我正在执行大量分配,所以我的应用程序内存使用率过高,因为现有对象在释放时没有被释放。从视图中关闭。

我需要做的就是禁用该文件的 ARC,一切都应该没问题。我这样做了,添加了发布声明,效果非常好。除了一个错误。

每当项目未构建时(即错误消失且构建成功),它都会显示一条错误,指出 ARC 禁止向对象发送发布消息,即使我明确为该文件添加了异常在项目设置中。

我真正需要做的就是消除错误,因为没有错误(因为它构建成功)。

任何帮助表示赞赏。

I have recently converted my project to use ARC (Automatic Reference Counting).

It doesn't really do a very good job of knowing when to actually release an object, and often because I have lots of allocations being performed, my application has excessively high memory usage because the existing objects aren't being deallocated when they're closed from view.

All I need to be able to do is disable ARC for that file, and everything should be OK. I did that, added the release statement, and it worked perfectly. Except of an error.

Whenever the project isn't being built (ie. the error disappears and the build succeeds while building it) it shows an error stating that ARC prohibits the sending of the release message to an object, even though I explicitly added an exception for that file in the Project Settings.

All I really need to do is silence the error, as there is no error (as it builds successfully).

Any help appreciated.

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

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

发布评论

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

评论(1

空名 2024-12-27 10:03:38

好吧,经过几次构建和清理后,错误奇迹般地消失了。

这些问题在 Xcode 4 中很常见,我从明显正在使用的东西中收到了未使用的变量警告。

Well, after several builds and cleans, the error has miraculously disappeared.

These problems have been frequent in Xcode 4, I got an unused variable warning from something that was clearly being used.

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