I\'ve seeen the following snippet quite a bit:
In the header:
SomeClass *bla;
@property(nonatomic,retain) SomeClass *bla;
In the implem
Yes, you are right - using the synthesized setter of a retain
property would increase the ref-count on an instance you already own (as alloc
implies ownership).
Just go with the second form you mentioned in your initializers:
_bla = [[SomeClass alloc] init];
... and remember to fix the retain count otherwise, e.g.:
self.bla = [[[SomeClass alloc] init] autorelease];