投稿

'autorelease' is unavailable: not available in automatic reference counting mode

xCode4.2でコーディング中、 古いソースではビルドが通っているものをコピーしてきたところ、 表題のエラーが大量発生。 どうも、iOS5からはARC(Automatic Reference Counting)の設定を 有効にしていると、ソース内にreleaseを含める必要が無いそうです。 VB出身の筆者にとってはメモリ管理はなかなか慣れず、嬉しい変更です♪ とはいえ、書き直しも面倒なので以下の設定変更し解決。 1.ProjectNavigatorからProjectのrootをクリック 2.Build Settingsをクリック 3.Allをクリック 4.Apple LLVM Compiler 3.0 - languageの    objective-C Automatic Reference CountingをNoへ変更