My isa-swizzling breaks KVO
问题 I'm trying to implement isa swizzling because I need some actions to happen in dealloc method of certain object. I'm overriding - (Class)class; method to return original class (as KVO does). Everything works fine, until I try to add observer to swizzled object. It just crashes. 0x00000000 in 0x00000000 () 0x0091d22a in _NSKeyValueRetainedObservationInfoForObject () 0x0092ec88 in -[NSObject(NSKeyValueObserverRegistration) _addObserver:forProperty:options:context:] () 0x0092d6fd in -[NSObject