performSelector may cause a leak because its selector is unknown

后端 未结 19 2234
小蘑菇
小蘑菇 2020-11-22 01:54

I\'m getting the following warning by the ARC compiler:

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

Here\'s what

相关标签:
19条回答
  • 2020-11-22 02:53

    Because you are using ARC you must be using iOS 4.0 or later. This means you could use blocks. If instead of remembering the selector to perform you instead took a block, ARC would be able to better track what is actually going on and you wouldn't have to run the risk of accidentally introducing a memory leak.

    0 讨论(0)
提交回复
热议问题