Is using autorelease a lot of overhead for iPhone applications?
Is it enough overhead to worry about the following...
Would string2 be better/worse implementation? Or does it not matter and I am worrying too much about it.
Thanks!
I am new to iPhone Programming and Objective-C.
Is it enough overhead to worry about the following...
Code:
// This gives me a NSString that will autorelease. (I think)
NSString *string1 = [NSString stringWithFormat:@"%@, %@",
lastName, firstName];
NSString *string2 = [[NSString alloc] initWithFormat:@"%@, %@",
lastName, firstName];
// Do some stuff with strings
[string2 release];
Would string2 be better/worse implementation? Or does it not matter and I am worrying too much about it.
Thanks!
I am new to iPhone Programming and Objective-C.