Removing a NSNotificationCenter observer in iOS 5 ARC

后端 未结 3 1075
轮回少年
轮回少年 2020-12-31 01:11

I have an iOS 5 ARC-based project, and am having difficulty about where I should be removing the observer for the NSNotificationCenter observations which I have

3条回答
  •  感动是毒
    2020-12-31 01:47

    If your dealloc isn't being called, it's likely because someone is still holding a reference to the view controller. Perhaps you need to mark something as __weak? You can use the allocations instrument to help track down what's holding on to your view controller.

提交回复
热议问题