Thank you very much.

________________________________
> Date: Wed, 22 Jul 2009 18:53:57 +0200
> Subject: Re: UUID method Garbage Collection safe?
> From: [email protected]
> To: [email protected]
> CC: [email protected]
>
> 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 protected])
>
>
>
> 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:
>
> http://lists.apple.com/mailman/options/cocoa-dev/jjalon%40gmail.com
>
>
>
> This email sent to [email protected]
>
>

_________________________________________________________________
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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to