There is no notification about object deallocation.
The system will not use setter method (this means no KVO notifications will be raised). The ivar is the real weak reference which gets zeroed. The weak
keyword on a property is merely an instruction for synthesizing the ivar, and a public declaration that the object is not retained.
Though you can always invent your own notifications and send them from dealloc
method of your classes, note that normally you should not ever be interested in such notifications and there is at least one good reason that they don't exist.
Whenever there is any kind of automatic memory management is in use, you can not (by definition) expect objects to die exactly when you need them to, that applies to Objective-C reference counting. Because any component may unexpectedly prolong lifetime of any object for unknown period of time, relying program behavior on assumption that dealloc
will be called exactly when you need it to is bad design and a recipe for trouble. dealloc
should be used for cleaning up only.
Try this rule of thumb: will the program still work correctly if dealloc
does not get called at all? If not, you should rethink program's logic rather than sending out dealloc notifications.