[NSString stringWithFormat:]
withに渡した後に C 文字列を解放できます%s
か? 例えば:
char *str = malloc(...);
// ... populate str ...
NSString *message = [NSString stringWithFormat:@"[%s]", str];
free(str); // should this be here, or after I'm done with message?
[NSString stringWithFormat:]
withに渡した後に C 文字列を解放できます%s
か? 例えば:
char *str = malloc(...);
// ... populate str ...
NSString *message = [NSString stringWithFormat:@"[%s]", str];
free(str); // should this be here, or after I'm done with message?