Featured post

Difference between protocol and delegates?

A protocol, declared with the ( @protocol syntax in Objective-C) is used to declare a set of methods that a class "adopts" (de...

Thursday, 9 April 2015

What is retain = strong in Objective C?

-it is retained, old value is released and it is assigned
-retain specifies the new value should be sent -retain on assignment and the old value sent -release
-retain is the same as strong.
-apple says if you write retain it will auto converted/work like strong only.
-methods like "alloc" include an implicit "retain"

Example:
@property (nonatomic, retain) NSString *name;
@synthesize name;

No comments:

Post a Comment