Users Pricing

forum

home / developersection / forums / performselector may cause a leak because its selector is unknown

performSelector may cause a leak because its selector is unknown

Anonymous User 2622 25 Apr 2015
I'm getting the following warning by the ARC compiler:
"performSelector may cause a leak because its selector is unknown".
Here's what I'm doing:
[_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?

I am a content writter !


1 Answers

Anonymous User 25 Apr 2015 Accepted Answer