New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

stringWithFormat or initWithFormat ?

Post Reply New Thread Subscribe

Thread Tools

Bracer's Avatar
Member Since: Oct 07, 2009
Location: Singapore
Posts: 14
Bracer is on a distinguished road

Bracer is offline
NSMutableString* variable = [NSMutableString stringWithFormat:@"%d %d %d",1,2,3];
NSMutableString* variable = [ [NSMutableString alloc] initWithFormat:@"%d %d %d",1,2,3];
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 Thanks

Post Reply New Thread Subscribe

« macbook mysql error | cant restart mysql »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Why do you need to "alloc" for initWithCString and but doesn't for stringWithFormat ? Bracer OS X - Development and Darwin 2 10-11-2009 03:50 PM

All times are GMT -4. The time now is 02:29 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?