|
|
|
|
|
by adamjernst
5372 days ago
|
|
I can contrive one. Class A holds a strong (i.e., retain) reference to an instance of class B in a property "myB". A also has a property "myC" which B observes. - (void)dealloc {
self.someOtherVariable = nil;
self.myC = nil; // Sends KVO on myC. B sees half-deconstructed A.
self.myB = nil; // myB now is dealloc'd and stops observing A.
[super dealloc];
}
Admittedly this is a real edge case and probably bad design, but it's not overtly terrible. I have a couple cases where objects observe their owners.BTW thanks for the blog, Mike! I love it. |
|
There may well be similar setups which aren't broken which still exhibit the problem, though.
Glad you enjoy the blog!