On Jul 26, 2009, at 2:52 PM, "Adam R. Maxwell" <[email protected]> wrote:

"CFString objects perform other “tricks” to conserve memory, such as incrementing the reference count when a CFString is copied."

Not every NSString is necessarily a CFString. They're toll-free bridged, but that just means the CF implementation needs to be aware of any non-NSCFString instances it is handed. I belive the private NSPathStorage class might not be a subclass of NSCFString.

IOW, just because two types are toll-free bridged does not mean they have the same behavior. Look at NSDictionary for a known example; if you create a CFDictionary with certain options and then use it as an NSDictionary you do not get the same behavior (I believe the relevant option involves whether the dictionary should copy its keys).

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to