2014/02/01 @ GREE

I have no doubt that automatic reference counting (ARC) is the next big leap forward for Objective-C since the introduction of Objective-C 2.0. ARC allows you to put the burden of memory management on the (Apple LLVM 3.0) compiler, and never think about retain, release and autorelease ever again. Since many user’s first experiences with ARC will be trying to convert an existing app, they will lear
iOS5からサポートされているARC(Automatic Reference Counting)は今まで使う機会がなかったので名前だけ知ってるみたいな状態でした。 今さらですがいろいろ調べたので調査結果をまとめたいと思います。調査した環境は以下になります。 Mac OS X 10.8 Mountain lion Xcode 4.6.3 まずは参照カウンタ方式の復習 ARCは基本的には以前と同じ参照カウンタ方式を自動化したものなので、ARCをやる前にまずは手動でのメモリ管理を復習します。 まずは新しいプロジェクトを作成します。テンプレートはCommand Line Toolを使います。 今回は手動でメモリ管理するのでARCはチェックを外しておいて下さい。 プロジェクトが作成できたらCarクラスとEngineクラスを作成して下さい。テンプレートはObjective-C classです。 サンプ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く