In nsobject, you have the "keyPath" property that you want to observe yourself, and you use
[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:nil];
Does the above line cause a hold cycle?
I present this question because I wanted to know if this was a viable alternative to rewriting a lot of setter functions.
memory-leaks objective-c key-value-observing retain-cycle kvc
Biclops
source share