在剛剛開始學習IOS開發時,最好不要開啟ARC,這樣有助於學習內存管理,但不少剛剛接觸Xcode的朋友可能會發現,當你使用最新版本的Xcode時,敲入release等代碼時會提示報錯。這是因為系統默認使用自動內存管理,下面就簡單說明下如何設置這個ARC。
注解:IOS 5.0以後,xcode4.2之後
//ARC(auto reference count)-自動引用計數,
//編譯器自動幫我們計算引用計數器,編輯器會知道什麼時候做[stu release],
//Student *stu=[[[Student alloc] init]autorelease];
工具/原料
方法/步驟
1、Now,xcode version 5.1.1 Member of my iMAC. a new Project,you can't Release Memory directorily.

- 2、Find the Title of this Project left,Center infomation->levels->ARC search... find the flag->YES turn to NO...OK!

3、Now,you can Release Memory on you xcode version 5.1.1 member. Attention Please: Way for Other Version on xcode.
