Possible duplicate:
With ARC, why use @properties anymore?
NB: Actually, I don’t think we can do away with properties, but I’m trying to understand why it’s not. :)
Returning to this question , it seems to us that the main reason we use properties is to avoid memory management problems. In other words, by creating a property, we get rid of the need to write down all of these save and release methods:
- (void) setOtherObj:(MyOtherObject *)anOtherObject {
if (otherObject == anOtherObject) {
return;
}
MyOtherObject *oldOtherObject = otherObject;
otherObject = [anOtherObject retain];
[oldOtherObject release];
}
Since ARC is dealing with this now, could we end the properties together and just install ivars by doing something like otherObject = anotherObject?
source