Skip navigation.
 
mlRe: Cocoa string to carbon compatible C string
FROM : Scott Ribe
DATE : Mon May 12 19:41:49 2008

There's also the issue of the lifetime of the string. Will initSomeSystem
hang on to the char * after the call returns? If so, your code will blow up
since when the NSString goes it will take with it that C string--instead
you'd have use one of the calls that *copies* the C string into a buffer
that you provide.

--
Scott Ribe
<email_removed>
http://www.killerbytes.com/
(303) 722-0567 voice

Related mailsAuthorDate
mlCocoa string to carbon compatible C string Steve Cronin May 11, 19:36
mlRe: Cocoa string to carbon compatible C string Nick Zitzmann May 11, 19:59
mlRe: Cocoa string to carbon compatible C string Jens Alfke May 11, 22:38
mlRe: Cocoa string to carbon compatible C string Steve Cronin May 12, 00:11
mlRe: Cocoa string to carbon compatible C string Nick Zitzmann May 12, 00:14
mlRe: Cocoa string to carbon compatible C string Scott Ribe May 12, 19:41