Re: Unclear on -initWithBytesNoCopy:
Re: Unclear on -initWithBytesNoCopy:
- Subject: Re: Unclear on -initWithBytesNoCopy:
- From: Wade Tregaskis <email@hidden>
- Date: Mon, 05 Mar 2012 21:30:30 -0800
> I’m not sure I’d want that either, though. If the original string was a 200-page dissertation and you took a one-word substring from it, it doesn’t seem reasonable to keep the whole 200-page dissertation all in RAM just to keep the one-word substring around.
But that's a very old problem that's been dealt with in numerous ways over the years. It could easily be addressed as an implementation detail.
The key point however is that CFString/NSString are nowhere near that smart, and they're not likely to be (GNUstep or others aside). If you're dealing with a large chunk of text like a dissertation then you're probably dealing with a lot of other elements as well, and using much higher-order objects to represent things.
_______________________________________________
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:
This email sent to email@hidden