Possible Duplicate:
Properties and Instance Variables in Objective-C 2.0
I'm using properties only for ivars that don't require any real validation when getting or setting a value for a class that I'm authoring.
Ex:
@interface ClassB : NSObject
{
// No ivars
}
@property (nonatomic, retain) ClassA *obj;
@property (nonatomic, retain) NSString *str;
Whenever I call these methods within the class I'm always using self.obj/self.str or [self obj]/[self str]. This way in order to set the state of the object you are forced to go through the property so that the references are more carefully managed by the compiler produced getters and setters. With that said, are there any problems that I can run into creating my classes this way? Also, with no ivar present, is any "release" needed in an overwritten "dealloc" method in the @implementation file?