Xcode 內存泄露檢查出現:nil returned from a method that is expected to return a non-null value iOS 解決方案。


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

   

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM