1. Brandon Walkin
  2. BWToolkit

Commits

Brandon Walkin  committed e173265

Fixed CF garbage collection issue

  • Participants
  • Parent commits 40be6e0
  • Branches default

Comments (0)

Files changed (1)

File NSString+BWAdditions.m

View file
 + (NSString *)randomUUID
 {
 	CFUUIDRef uuidObj = CFUUIDCreate(nil);
-	NSString *newUUID = (NSString*)CFUUIDCreateString(nil, uuidObj);
+	NSString *newUUID = (NSString*)CFMakeCollectable(CFUUIDCreateString(nil, uuidObj));
 	CFRelease(uuidObj);
 	
 	return [newUUID autorelease];