Re: Performance, Efficiency - Coding practice
Re: Performance, Efficiency - Coding practice
- Subject: Re: Performance, Efficiency - Coding practice
- From: Graham Cox <email@hidden>
- Date: Fri, 29 May 2009 10:48:24 +1000
On 29/05/2009, at 10:42 AM, John Ku wrote:
NSMutableString *title = [[NSString alloc] init];
[title setString: @"test"];
That would be correct and safe?
Yes, but pointless.
If the string is a constant, use a constant.
NSString* string = @"whatever";
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden