lets say I have aclass
@interface Foo :NSobject
{
NSstring *a;
NSDate *b;
}
Foo *temp;
my question is: when i use [temp retain]
does the counter of the members also retain?
lets say that i got ref of the class from some method and i want to retain the class do i need to retain each member?
No.
No.
The members’ lifetime should be managed by the Foo class itself, not the user of the Foo class. If you can/need to change the retain count of the members, the class is not properly encapsulated.