On May 28, 2009, at 9:20 AM, Reza Farhad wrote:

I have a situation where I need to create a new string as I go through a loop. What will be the most efficient way of doing this each time the call goes through the loop.

1. To create an auto releasing string.
2. To create a non auto-releasing string at the start of the loop and releasing it at the end of the loop. 3. To create a non auto-releasing mutable string before the loop and then at the start of the loop delete and reset it content to a new value. And obviously delete the string after the loop.

4. An alternative suggestion!!!!


5. Pick the easiest one of these, and then wait until you start profiling your application to decide if this even needs to be optimized.

--
Dave Carrigan
d...@rudedog.org
Seattle, WA, USA

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to