Re: NSString initWithCharactersNoCopy
Re: NSString initWithCharactersNoCopy
- Subject: Re: NSString initWithCharactersNoCopy
- From: Shawn Erickson <email@hidden>
- Date: Fri, 11 Jun 2004 14:46:42 -0700
On Jun 11, 2004, at 12:21 PM, John Stiles wrote:
I'm looking at the following NSString prototype:
- (id)initWithCharactersNoCopy:(unichar *)characters
length:(unsigned)length freeWhenDone:(BOOL)flag
And wondering why characters is a unichar* and not a const unichar*.
Can this call really modify the buffer? I'm not making an
NSMutableString...
Note the "freeWhenDone:" part of that method. It will free the buffer
you pass in at some future date if you pass in YES. I assume that is
why.
-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.