日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

How to Fix an App that Crashes in Release but n...

發布時間:2023/12/10 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 How to Fix an App that Crashes in Release but n... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2019獨角獸企業重金招聘Python工程師標準>>>

????今天在測試app時,發現app store上版本有奔潰現象,但是直接用xcode跑本地程序沒問題。猜測release&debug版本造成的,后發現targets的 optimization level設置問題,將release版本的optimization level改為none后程序不再崩潰。

參考見: http://www.mindjuice.net/2011/11/30/how-to-fix-an-app-that-crashes-in-release-but-not-debug/

關于優化級別:GCC_OPTIMIZATION_LEVEL 描述如下
None: Do not optimize. [-O0]

With this setting, the compiler's goal is to reduce the cost of compilation and to make debugging produce the expected results.? Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code.

Fast: Optimizing compilation takes somewhat more time, and a lot more memory for a large function. [-O, -O1]

?With this setting, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time. In Apple's compiler, strict aliasing, block reordering, and inter-block scheduling are disabled by default when optimizing.

Faster: The compiler performs nearly all supported optimizations that do not involve a space-speed tradeoff. [-O2]

With this setting, the compiler does not perform loop unrolling or function inlining, or register renaming.? As compared to the 'Fast' setting, this setting increases both compilation time and the performance of the generated code.

Fastest: Turns on all optimizations specified by the 'Faster' setting and also turns on function inlining and register renaming options. This setting may result in a larger binary. [-O3]

Fastest, smallest: Optimize for size.? This setting enables all 'Faster' optimizations that do not typically increase code size.? It also performs further optimizations designed to reduce code size.

轉載于:https://my.oschina.net/michael1986/blog/129607

總結

以上是生活随笔為你收集整理的How to Fix an App that Crashes in Release but n...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。