gpt4 book ai didi

automatic-ref-counting - Core Plot 和 Xcode 5.1 - 如何将 Core Plot 转换为 ARC?

转载 作者:行者123 更新时间:2023-12-04 00:18:08 24 4
gpt4 key购买 nike

我刚刚安装了Xcode 5.1,发现它肯定要求项目使用ARC。我明白了

error: garbage collection is no longer supported

尝试编译 Core Plot(1.4 版)时。出于好奇,我告诉 Xcode 将 Core Plot 转换为 ARC。但它失败了

ARC forbids Objective-C objects in struct

在文件 CPTPlatformSpecificFunctions.m 中。我不想深入研究 Core Plot 并通过尝试修复此错误或类似错误来破坏某些东西。是否有我忽略的编译器设置?或者很快就会有使用 ARC 的 Core Plot 版本?谢谢,德克

最佳答案

Xcode 5.1 不要求项目使用 ARC,它最终放弃了对垃圾回收的支持。 Core Plot 从来都不是一个严格的垃圾收集框架,但它确实支持垃圾收集的构建。

在打开 Core Plot 项目时出现该对话框时,您可以单击“Not Now”选项,然后转到项目build设置。清空或删除项目底部用户设置下的 GCC_ENABLE_OBJC_GC 设置,项目将作为手动引用计数目标构建得很好。这在 ARC 或非 ARC 应用程序中非常有用。

关于automatic-ref-counting - Core Plot 和 Xcode 5.1 - 如何将 Core Plot 转换为 ARC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22335957/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com