Xcode 内存泄露检查出现:nil returned from a method that is expected to return a non-null value iOS 解决方案。
时间:2019-01-18 16:00:17
收藏:0
阅读:847
在 使用 Xcode 检查内存泄露时(cmd+shift+B)运行,出现了一个警告:nil returned from a method that is expected to return a non-null value iOS
原因是返回了一个 不能为空 的对象。
解决方案:使用 abort() 函数;
The abort()
function is marked with __attribute__((noreturn))
, therefore the compiler will not complain about a missing return value.
原文:https://www.cnblogs.com/ZachRobin/p/10288024.html
评论(0)