使用Xcode 查看objective-C的彙編代碼,xcodeobjective-c

來源:互聯網
上載者:User

使用Xcode 查看objective-C的彙編代碼,xcodeobjective-c

Xcode內建將某一個源檔案轉化成彙編的功能,



彙編的部分代碼如下:

# Assembly output for assemble.c# Generated at 2:29:34 下午 on 星期一, 八月 18, 2014# Using Debug configuration, x86_64 architecture for dataStruct target of dataStruct project.section__TEXT,__text,regular,pure_instructions.section__DWARF,__debug_info,regular,debugLsection_info:.section__DWARF,__debug_abbrev,regular,debugLsection_abbrev:.section__DWARF,__debug_aranges,regular,debug.section__DWARF,__debug_macinfo,regular,debug.section__DWARF,__debug_line,regular,debugLsection_line:.section__DWARF,__debug_loc,regular,debug.section__DWARF,__debug_str,regular,debugLinfo_string:.section__DWARF,__debug_ranges,regular,debugLdebug_range:.section__DWARF,__debug_loc,regular,debugLsection_debug_loc:.section__TEXT,__text,regular,pure_instructionsLtext_begin:.section__DATA,__data.file1 "/Users/guoxiaodong/Documents/codeExemple/dataStruct/assemble.c".section__TEXT,__text,regular,pure_instructions.globl_func0.align4, 0x90_func0:                                 ## @func0




Xcode 下使用objective-c文法編寫程式,會產生m 檔案,裡面的代碼是什

pool = [[NSAutoreleasePool alloc] init];
上面的寫法是建立一個自動釋放池,會在[pool autorelese];時向池子中的所有對象發送一條release訊息,並且自身會銷毀.而[pool drain];這條語句只會向池中對象發送release訊息,並不會自身銷毀,也就是說這個池子還存在,還可以繼續使用.(pool這個對象還沒有dealloc)
我也是新手希望能有大神標準回複.
 
objective-c 可以調用標準c++代碼?就是說標準c++可以不可以嵌入到xcode項目中去?

蘋果的Objective-C編譯器允許使用者在同一個源檔案裡自由地混合使用C++和Objective-C,混編後的語言叫Objective-C++。有了它,你就可以在Objective-C應用程式中使用已有的C++類庫。
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.