Maybe someone could explain the difference between property:
in .h file
@property(nonatomic,retain) NSString *someString;
@property(nonatomic,retain) NSString *someString2;
in .m file
@synthesize someString = _someString;
or
@synthesize someString2;
what is the difference for _someString and self.someString2 using in controller?
and in dealloc how i should release these property’s
[_someString release];
AND
[self.someString2 release];
OR
_someString = nil;
_someString2 = nil;
After:
and:
someStringis a property backed by the instance variable_someString. Memory retention and release is managed by Obj-C.someStringshould use the formself.someStringwithin the class, and must use<reference>.someStringoutside of it. Except within an initializer there should never be any assignments to a plain_someString._someStringwithin the class, butself.someStringis also valid, and must use<reference>.someStringoutside of it.self.someString = nilwithin the class, and<reference>.someString = niloutside of it.someString2is similar except it is backed by an automatically named instance variable, which happens to be calledsomeString2.