Re: Strings from UUID
Re: Strings from UUID
- Subject: Re: Strings from UUID
- From: j o a r <email@hidden>
- Date: Fri, 9 Aug 2002 22:05:02 +0200
Stoopid question perhaps, but here goes: With regards to balancing the
retain count on the string, would this also work?
@implementation NSString (Additions)
+ (NSString *) uniqueString
{
NSString *uString = (NSString
*)CFUUIDCreateString(kCFAllocatorDefault,
CFUUIDCreate(kCFAllocatorDefault));
return [uString autorelease];
}
@end
...or would you need to have a CFRelease()?
j o a r
On Friday, Aug 9, 2002, at 20:52 Europe/Stockholm, Jim Murry wrote:
CFUUIDRef u = CFUUIDCreate(NULL);
[uuid setStringValue:(NSString *)CFUUIDCreateString(NULL, u)];
CFRelease(u);
_______________________________________________
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.