参考文档:https://developer.apple.com/library/content/releasenotes/Foundation/RN-FoundationOlderNotes/index.html#X10_11Notes
NSNotificationCenter
In OS X 10.11 and iOS 9.0 NSNotificationCenter and NSDistributedNotificationCenter will no longer send notifications to registered observers that may be deallocated. If the observer is able to be stored as a zeroing-weak reference the underlying storage will store the observer as a zeroing weak reference, alternative if the object cannot be stored weakly (i.e. it has a custom retain/release mechanism that would prevent the runtime from being able to store the object weakly) it will store the object as a non-weak zeroing reference. This means that observers are not required to un-register in their deallocation method. The next notification that would be routed to that observer will detect the zeroed reference and automatically un-register the observer. If an object can be weakly referenced notifications will no longer be sent to the observer during deallocation; the previous behavior of receiving notifications during dealloc is still present in the case of non-weakly zeroing reference observers. Block based observers via the -[NSNotificationCenter addObserverForName:object:queue:usingBlock] method still need to be un-registered when no longer in use since the system still holds a strong reference to these observers. Removing observers (either weakly referenced or zeroing referenced) prematurely is still supported. CFNotificationCenterAddObserver does not conform to this behavior since the observer may not be an object.
在OS X 10.11 and iOS 9.0,NSNotificationCenter 和NSDistributedNotificationCenter将不在向可能已经dealloc的注册观察者发送通知。注意这里说的是可能dealloc.为什么说是可能dealloc?因为这里涉及到两个系统一个是OS一个是iOS,OS X10.5之后有了垃圾回收机制。如果观察者有能力被保存zeroing-weak,或者被保存为non-weak zeroing reference。这意味着观察者没有必要取消注册在它的dealloc方法里。下一次的通知,发送将会检测zeroed reference,然后取消注册观察者。如果一个对象弱引用,通知将不在发送到观察者在dealloc时。过去dealloc后,还会接受通知。这种方式[NSNotificationCenter addObserverForName:object:queue:usingBlock]还需要取消注册。
简单一句话:引用计数为0,就不发送通知了。
NSNotificationCenter and NSDistributedNotificationCenter will now provide a debug description when printing from the debugger that will list all registered observers including references that have been zeroed out for aiding in debugging notification registrations. This data is only valid per the duration of the breakpoint since the underlying store must account for multithreaded environments. Wildcard registrations for notifications where the name or object that was passed to the addObserver method family was null will be printed in the debug description as *.