Guest User

Untitled

a guest
Jan 5th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. How I'm removing the observer:
  2.  
  3. - (void)dealloc{
  4. [self.observableObject removeObserver:self forKeyPath:nil];
  5. }
  6.  
  7. When I don't remove the observer and release things anyway:
  8.  
  9. An instance 0x5a2dc40 of class ObservableClass was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info
  10.  
  11. When I try to remove the observer before releasing the thing I'm observing:
  12.  
  13. CoreAnimation: ignoring exception: Cannot remove an observer <ObservingClass 0x5b503f0> for the key path "(null)" from <ObservableClass 0x5b507b0> because it is not registered as an observer.
Add Comment
Please, Sign In to add comment