Reputation: 93
When I use
addObserver:forKeyPath:options:context:
In this method, will the observer be a strong reference or just a weak reference in ARC?
Any ideas for this problematic?
Upvotes: 1
Views: 647
Reputation: 35358
See the documentation here
Note: The key-value observing addObserver:forKeyPath:options:context: method does not maintain strong references to the observing object, the observed objects, or the context. You should ensure that you maintain strong references to the observing, and observed, objects, and the context as necessary.
In short: The method does not maintain a strong reference to the observer.
Upvotes: 3