When is NS_RETURNS_RETAINED needed?
问题 Take the below example: - (NSString *)pcen NS_RETURNS_RETAINED { return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (__bridge CFStringRef) self, NULL, (CFStringRef) @"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8); } Is it correct to put the NS_RETURNS_RETAINED there? Another example: + (UIImage *)resizeImage:(UIImage *)img toSize:(CGSize)size NS_RETURNS_RETAINED { UIGraphicsBeginImageContextWithOptions(size, NO, 0.0); [img drawInRect:...]; UIImage *resizedImage