alloc + init with synthesized property - does it cause retain count to increase by two?
问题 I've seeen the following snippet quite a bit: In the header: SomeClass *bla; @property(nonatomic,retain) SomeClass *bla; In the implementation file: @synthesize bla; and then self.bla = [[SomeClass alloc] init]; I think that this assignment puts the retain count for 'bla' up by two; once through the alloc/init call, then through the retain that we asked to happen through the synthesized property setter. As a result, I normally declare my properties like this: In the header: SomeClass *_bla; /