• 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: UUID method Garbage Collection safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: UUID method Garbage Collection safe?


  • Subject: RE: UUID method Garbage Collection safe?
  • From: Squ Aire <email@hidden>
  • Date: Wed, 22 Jul 2009 19:42:02 +0000
  • Importance: Normal

Yes I was aware of this method. However, according to the docs it only guarantees uniqueness for a given process, and doesn't guarantee it will be "globally" unique, if you know what I mean. Thanks for the suggestion though.

----------------------------------------
> Subject: Re: UUID method Garbage Collection safe?
> From: email@hidden
> Date: Wed, 22 Jul 2009 18:26:40 +0100
> CC: email@hidden; email@hidden
> To: email@hidden
>
> Or just use [[NSProcessInfo processInfo] globallyUniqueString]
>
> Keith
>
> On 22 Jul 2009, at 17:53, Julien Jalon wrote:
>
>> Correct code is:
>> + (NSString *)stringWithUUID{ CFUUIDRef uuidObj = CFUUIDCreate(nil);
>> NSString *uuidString =
>> (NSString*)NSMakeCollectable(CFUUIDCreateString(nil,uuidObj));
>> CFRelease(uuidObj); return [uuidString autorelease];}
>>
>> Or you will leak in GC.
>>
>> --
>> Julien
>>
>> On Wed, Jul 22, 2009 at 6:45 PM, Squ Aire  wrote:
>>
>>>
>>> I've been using this method to make UUID strings:
>>>
>>> + (NSString *)stringWithUUID{ CFUUIDRef uuidObj = CFUUIDCreate(nil);
>>> NSString *uuidString = (NSString*)CFUUIDCreateString(nil,uuidObj);
>>> CFRelease(uuidObj); return [uuidString autorelease];}
>>>
>>> How do you all like it? Is it ok? It's based on some code I Googled
>>> a while
>>> back. In particular, is this code perfectly garbage collection safe?
>>> _________________________________________________________________
>>> Show them the way! Add maps and directions to your party invites.
>>>
>>> http://www.microsoft.com/windows/windowslive/products/events.aspx_______________________________________________
>>>
>>> Cocoa-dev mailing list (email@hidden)
>>>
>>> Please do not post admin requests or moderator comments to the list.
>>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>>
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>

_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UUID method Garbage Collection safe?
      • From: Jim Correia <email@hidden>
    • Re: UUID method Garbage Collection safe?
      • From: Bill Bumgarner <email@hidden>
References: 
 >UUID method Garbage Collection safe? (From: Squ Aire <email@hidden>)
 >Re: UUID method Garbage Collection safe? (From: Julien Jalon <email@hidden>)
 >Re: UUID method Garbage Collection safe? (From: Keith Duncan <email@hidden>)

  • Prev by Date: RE: UUID method Garbage Collection safe?
  • Next by Date: Re: [window frame] reporting wrong y coordinate
  • Previous by thread: Re: UUID method Garbage Collection safe?
  • Next by thread: Re: UUID method Garbage Collection safe?
  • Index(es):
    • Date
    • Thread