简体   繁体   中英

Apple Demo don't have “performSelector may cause a leak because its selector is unknown” Warning. Anyone know why?

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")];

But under Apple Demo , they don't have this Warning for the same code. Anyone know why?

That sample is not an ARC project. The warning you cite is the default with ARC projects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM