Commits

Anonymous committed e173265

Fixed CF garbage collection issue

Comments (0)

Files changed (1)

NSString+BWAdditions.m

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