首页 > 移动平台 > 详细

Xcode 内存泄露检查出现:nil returned from a method that is expected to return a non-null value iOS 解决方案。

时间:2019-01-18 16:00:17      阅读:848      评论:0      收藏:0      [点我收藏+]

  在 使用 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.

   技术分享图片

  

 

Xcode 内存泄露检查出现:nil returned from a method that is expected to return a non-null value iOS 解决方案。

原文:https://www.cnblogs.com/ZachRobin/p/10288024.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!