When I create a NSString with initWithFormat , I get an retain count of 1
-(NSString *)description
{
NSString *descr = [[NSString alloc]
initWithFormat:@"I am the description."];
NSLog(@"Count: %lu",[descr retainCount]);
return [descr autorelease];
}
If I use initWithString instead I get a count of 2147483647
NSString *descr = [[NSString alloc]
initWithString:@"I am the description."];
So there must be a difference between these two methods in terms of memory management. What is happening here?