导致VC不能释放的几个原因

  1. delegate的属性不是weak
  2. NSTimer没有invalidate
  3. block中的强引用
  4. 调用了performSelector,退出时没有cancelPerformSelectorsWithTarget

    This method sets up a timer to perform the aSelector message on the current thread’s run loop. The timer is configured to run in the default mode (NSDefaultRunLoopMode).

    performSelector其实就是定时器,会强引用object。如果delay很长的话,就会被导致object很长时间不会被释放。

posted on 2016-09-11 22:21  花老🐯  阅读(280)  评论(0编辑  收藏  举报

导航