保持されることのない[Hoge alloc]。
// ARC
@implementation Hoge
-(instancetype)initWithA:(id)a B:(id)b{
Hoge *h = [[Hoge alloc] init];
h.a = a;
h.b = b;
return h;
}
// 使う時
Hoge *h = [[Hoge alloc] initWithA:@"A" B:@"B"];
使い方ヒント: 「これは臭う」という行を見付けたら、各行の
をクリックしてマーキングしておきましょう(要Twitter OAuth認証)
まだコメントがありません。最初にコメントを残しませんか?
コメント投稿には、twitter認証が必要です。
Twitter認証