Xcode 5构建设置“未使用的函数”实际上做什么?

时间:2022-09-06 21:16:32

Xcode 5 has a build setting called "Unused Functions." I have read elsewhere that "The compiler can never tell if an Objective-C method is truly unused, because it may be called dynamically, either via performSelector:, via subclassing, or many other ways." Given that unused parameters does in fact show parameters that are not being used I was surprised that unused functions does not have the implied behaviors.

Xcode 5有一个名为“未使用的函数”的构建设置。我在其他地方读到过“编译器永远无法判断一个Objective-C方法是否真的没有用过,因为它可能被动态调用,或者通过performSelector:,通过子类,或者其他很多方式。”考虑到未使用的参数实际上显示了未使用的参数,我很惊讶未使用的函数没有隐含的行为。

Can someone explain what is the meaning/impact of this setting?

有人能解释一下这个场景的意义/影响吗?

Xcode 5构建设置“未使用的函数”实际上做什么?

1 个解决方案

#1


7  

It applies to functions, rather than to methods.

它适用于函数,而不是方法。

#1


7  

It applies to functions, rather than to methods.

它适用于函数,而不是方法。