Possible Duplicate:
memory management objective c - returning objects from methods
I have a confusion with retaining object. If I have an function that will return an object like this:
- (object) functionA {
NSObject* o = [[object alloc] init];
return o;
}
The object returned will have retain count of 1.... But is this best practice to do this or shall i put autorelease first and let the caller retain the object.