Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableString appendString: "appending self" allowed?



Have a look at the source code. It's open source.

Hmm, ok, you mean in CFString.c of Darwin? Can I be sure that e.g. the appendString method of a Cocoa NSString is directly mapping to the equivalent CFString function (CFStringAppend in this case)?


To answer my own question (and if CFStringAppend is used):

For the special case of appending a string to itself there is special handling at least in the sources for 10.4.10. But I also looked into the sources for 10.3.9 and there this special handling is missing. The special handling just creates a temporary copy of the string.

So I'd better do my own copy, to be on the safe side.

Mani

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSMutableString appendString: "appending self" allowed? (From: Manfred Schwind <email@hidden>)
 >Re: NSMutableString appendString: "appending self" allowed? (From: Chris Suter <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.