I have a few basic questions regarding the syntax and usage of properties in Objective C and would appreciate it if someone could answer them please.
Assume the following declaration in the header:
@interface TestObject : NSObject {
NSArray *myArray;
}
@property (nonatomic, retain) NSArray *myArray;
In the implementation, can I?:
- Use myArray and self.myArray interchangeably for setting and getting purposes?
- Is self.myArray = nil equivalent to [myArray release]? If so, Is there ever a reason to use self.myArray = nil rather than [myArray release]?
Thanks!