• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unclear on -initWithBytesNoCopy:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Unclear on -initWithBytesNoCopy: (From: Jens Alfke <email@hidden>)
 >Re: Unclear on -initWithBytesNoCopy: (From: Eli Bach2 <email@hidden>)
 >Re: Unclear on -initWithBytesNoCopy: (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Unclear on -initWithBytesNoCopy:
  • Next by Date: Re: notAKeyMarker crash
  • Previous by thread: Re: Unclear on -initWithBytesNoCopy:
  • Next by thread: NSURL and NSRegularExpression
  • Index(es):
    • Date
    • Thread