最近在寫騰訊云IM飒责,發(fā)現(xiàn)每次退出登錄重新登錄,都會報signal SIGABRT崩潰,提示信息如下
Cannot form weak reference to instance (0x10356a040) of class MessageViewController. It is possible that this object was over-released, or is in the process of deallocation.
查了一下發(fā)現(xiàn)是過度釋放,但在arc里面是很少出現(xiàn)這種情況的。之后就定位問題最后發(fā)現(xiàn)在會話類里用到了FBKVOController
- (void)dealloc
{
? ? [self.KVOController unobserveAll];
}
在FBKVOController本類里
- (void)dealloc
{
? [self unobserveAll];
}
顯然移除監(jiān)聽兩次疲憋。把會話里的dealloc刪除,問題解決梁只。