Re: What is the life of the c string returned by NSString's UTF8String method?
Re: What is the life of the c string returned by NSString's UTF8String method?
- Subject: Re: What is the life of the c string returned by NSString's UTF8String method?
- From: "Sean McBride" <email@hidden>
- Date: Fri, 18 Sep 2009 14:20:47 -0400
- Organization: Rogue Research Inc.
On 9/18/09 2:04 PM, Stuart Malin said:
>I have a class with some (statically allocated) class variables. In
>the class's -initialize method, I create a retained NSString. I set
>one of the class variables to the value returned by -UTF8String (as
>sent to that retained NSString). I use this char* value in some C
>calls made from instance methods of the class.
It would be much safer to just call -UTF8String as needed. Or have you
found that it is a bottleneck in your code?
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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