Today i was overwriting -(NSString*)description method and i wondered if need to autorelease this string before returning it.
-(NSString*)description {
NSMutableString *response = [[NSMutableString alloc] init];
// perform appends
return [response autorelease];
}
Yes, as per ownership rule your function must not delegate the ownership of the returned string to the caller.