An instance 0x172b8600 of class UITableView was deallocated while key value
从带有tableview并且使用Mj下拉刷新的视图调用popViewControllerAnimated的时候,控制台打印这个: An instance 0x15d7aa00 of class UITableView 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: <NSKeyValueObservationInfo 0x16835900> ( <NSKeyValueObservance 0x16835a40: Observer: 0x16834ed0, Key path: contentOffset, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x15748160> )
解决办法:
- ( void )dealloc{
[ _header free ];
[ _footer free ];
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步