美文网首页
dealloc 报错

dealloc 报错

作者: Abel0101 | 来源:发表于2018-06-26 14:04 被阅读25次

在dealloc 中报错 It is possible that this object was over-released, or is in the process of deallocation.

问题代码:

[self.popView removeFromSuperview];

self.popView = nil;

分析原因,因为我没有使用到self.popView,self.popView在dealloc中会先初始化,这时候就报错了。

解决方法:

[_popView removeFromSuperview];

self.popView = nil;

相关文章

网友评论

      本文标题:dealloc 报错

      本文链接:https://www.haomeiwen.com/subject/lbpyattx.html