ARC 以前は、メモリ リークを回避するためにプロパティに値を設定する方法は次のとおりでした。
NSDictionary *tempDict = [[NSDictionary alloc]init];
self.dictionary = tempDict;
[tempDict release];
しかし、アークでは、2 ライン スタイルを使用する必要がありますか?それとも 1 ライン セッターだけを使用できますか?
self.dictionary = [[NSDictionary alloc]init];
対
NSDictionary *tempDict = [[NSDictionary alloc]init];
self.dictionary = tempDict;
また、一般的な iOS dev では、インスタンス変数を直接使用するのではなく、ほとんどの場合プロパティを使用するだけで安全ですか?