我正在创建这样的NSString,我之后是否应该发布它?
CFUUIDRef uuidObj = CFUUIDCreate(nil);
NSString *device = (NSString*)CFUUIDCreateString(nil, uuidObj);
CFRelease(uuidObj);
谢谢!
答案 0 :(得分:7)
答案 1 :(得分:6)
CFUUIDRef theUUID = CFUUIDCreate(NULL);
NSString *s2ndUuid = (__bridge_transfer NSString*)CFUUIDCreateString(kCFAllocatorDefault, theUUID);