Let's see a sample straight from
Now, that processID is static in a sense that we have that as member rather than a pointer to processID
Will this work only on primitive type like NSInteger?
Given that it's static, we do not need to dealloc it. So why not make every member static?
They'll be on the heap anyway instead of the stack because the Run object is in the stack
Code:
@interface Run : NSManagedObject {
NSInteger processID;
}
@property (retain) NSDate *date;
@property (retain) NSDate *primitiveDate;
@property NSInteger processID;
Now, that processID is static in a sense that we have that as member rather than a pointer to processID
Will this work only on primitive type like NSInteger?
Given that it's static, we do not need to dealloc it. So why not make every member static?
They'll be on the heap anyway instead of the stack because the Run object is in the stack