Closed Tanyd closed 8 years ago
什么意思? dealloc没有调用?你是ARC工程吗?
pop后,程序蹦,提示没有销毁kvo,-(void)dealloc { [self.originImageView removeObserver:self forKeyPath:@"image"]; [self.originImageView removeObserver:self forKeyPath:@"contentMode"]; } 并没有调用.
应该不至于吧,我这么没有发现,找到原因了吗
An instance 0x15475ac00 of class UIImageView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x17085a340> ( <NSKeyValueObservance 0x1702d2440: Observer: 0x15475ac00, Key path: image, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x17024f9f0> )在keyWindow切换主控制器时,有几率发生. ImageView只有这里用了KVO. 是不是由于addObserver调用了2次导致,在多线程处理时?
这个应该不至于吧?这里没有用到多线程