With ARC, I can no longer cast CGColorRef to id. I learned that I need to do a bridged cast. According clang docs: A bridged cast is a C-style cast annotated with one of three keywords: (__bridge T) op casts the operand to the destination type T. If T is a retainable object pointer type, then op must have a non-retainable pointer type. If T is a non-retainable pointer type, then op must have a ret
[iOS5] ARC : Outletにはweakプロパティを使おう 2011/11/21/|iOS|メモリ管理, iOS5, ARC 今回は、ARCを用いた場合のプロパティ利用に関するTipsです。 ARCって何?と言う方は、まずはこちらからどうぞ。 [iOS5] ARC (Automatic Reference Counting) : Overview [iOS5] ARC : プロパティ属性と使い方 一般的なOutletにはweakプロパティを使う Interface Builderなどを用いて作成したOutletは、一般的に別のview(例えばUIViewControllerのviewなど)のsubviewであることがほとんどです。したがって、これらのOutletのオーナーとなるのはsuperviewのみで十分だと言えます。 ViewControllerは、自身がOutletのオー
Recently, Apple introduced several new developer stuff including Xcode 4, ARC, LLVM Compiler 3.0 and iOS 5. From some of the questions on Stack overflow, I could understand that, most of the ARC related confusions arise due to the fact that, developers don’t know if “ABC” is a feature/restriction of LLVM 3.0 or iOS 5 or ARC. Retain cycles, auto-release pools, @autorelease blocks, oh man! So many n
これまでの記事はこちら: [iOS5] ARC (Automatic Reference Counting) : Overview [iOS5] ARC : プロパティ属性と使い方 [iOS5] ARC : Outletにはweakプロパティを使おう [iOS5] ARC : 循環参照 ARCまとめの最終回はAutoreleaseとキャストについてです。また、最後で簡単にですが、Xcodeの環境設定についても触れます。 Autorelease ARC環境下では、これまでのNSAutoreleasePoolは使えません。そうは言っても、別にAutorelease環境がなくなってしまったわけではなく、作法が少し変わったのですね。 まずは、参考までにmain.mを見てみましょう。 非ARC(マニュアルメモリ管理) int main(int argc, char *argv[]) { NSAuto
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く