Reputation: 14251
I just got a large chunk of code that someone else have written. First I dismissed it as a typo but then noticed it in several other places as well.
The essentials is that the other programmer (not sure of his "skill level") declared some properties as
@property (strong, strong) NSObject *anObject;
The compiler does not complain so I was wondering if there is any reason for doing this or should I consider them all to be "typos"?
(The project uses ARC)
Upvotes: 8
Views: 211
Reputation: 16650
I see no sense in doing so and am surprised that the compiler does not complain about that.
Upvotes: 7
Reputation: 2337
I think the developer miswrote it. Strong keyword increases the retain count by 1 so by 2 strongs maybe the dev thought to increase retain count by 2..
Upvotes: 1