• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strings from UUID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Strings from UUID
      • From: Douglas Davidson <email@hidden>
References: 
 >Re: Strings from UUID (From: Jim Murry <email@hidden>)

  • Prev by Date: Re: Newbie Questions About Methods and Messages
  • Next by Date: Moving windows across multiple monitors
  • Previous by thread: Re: Strings from UUID
  • Next by thread: Re: Strings from UUID
  • Index(es):
    • Date
    • Thread