performSelector可能会致使泄漏,由于其选择器未知 - performSelector may cause a leak because its selector is unknown

问题:

I'm getting the following warning by the ARC compiler: ARC编译器收到如下警告: this

"performSelector may cause a leak because its selector is unknown".

Here's what I'm doing: 这是我在作什么: spa

[_controller performSelector:NSSelectorFromString(@"someMethod")];

Why do I get this warning? 为何会收到此警告? I understand the compiler can't check if the selector exists or not, but why would that cause a leak? 我知道编译器没法检查选择器是否存在,可是为何会致使泄漏? And how can I change my code so that I don't get this warning anymore? 以及如何更改个人代码,以便再也不收到此警告? .net


解决方案:

参考一: https://stackoom.com/question/TRVx/performSelector可能会致使泄漏-由于其选择器未知
参考二: https://oldbug.net/q/TRVx/performSelector-may-cause-a-leak-because-its-selector-is-unknown
相关文章
相关标签/搜索