这个错误从字面上来看就是有一个实例由于被observing而无法被释放。
具体原因可能是该对象添加了一个oberver。所以释放的时候要先取消observer。
具体方法是在 dealloc 方法中:
- (void)dealloc { [object removeObserver:self forKeyPath:@"aPath"]; }
ARC 下不能调用 super 的 dealloc 方法。
时间: 2024-08-11 03:36:39
这个错误从字面上来看就是有一个实例由于被observing而无法被释放。
具体原因可能是该对象添加了一个oberver。所以释放的时候要先取消observer。
具体方法是在 dealloc 方法中:
- (void)dealloc { [object removeObserver:self forKeyPath:@"aPath"]; }
ARC 下不能调用 super 的 dealloc 方法。