Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
stringWithFormat or initWithFormat ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Bracer" data-source="post: 923775" data-attributes="member: 125415"><p>[code]</p><p>NSMutableString* variable = [NSMutableString stringWithFormat:@"%d %d %d",1,2,3];</p><p>[/code]</p><p>[code]</p><p>NSMutableString* variable = [ [NSMutableString alloc] initWithFormat:@"%d %d %d",1,2,3];</p><p>[/code]</p><p></p><p>Is there any advantage the second example have over the first accept for the fact that you'll have to release it manually later ?</p></blockquote><p></p>
[QUOTE="Bracer, post: 923775, member: 125415"] [code] NSMutableString* variable = [NSMutableString stringWithFormat:@"%d %d %d",1,2,3]; [/code] [code] NSMutableString* variable = [ [NSMutableString alloc] initWithFormat:@"%d %d %d",1,2,3]; [/code] Is there any advantage the second example have over the first accept for the fact that you'll have to release it manually later ? [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
stringWithFormat or initWithFormat ?
Top