In ARC do we need to send removeObserver: explicitly?

后端 未结 4 1480
情歌与酒
情歌与酒 2020-12-16 13:45

Do we have to send removeObserver: explicitly for objects that have been added as observers to an NSNotificationCenter before?

I am bit con

4条回答
  •  执念已碎
    2020-12-16 14:09

    Yes, you need to call removeObserver:, if you don't the observed class could call all deallocated instance of the observer.

提交回复
热议问题