Skip to content

Commit

Permalink
Make autoreleasing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper Blues committed Nov 29, 2013
1 parent fe380ad commit edc1d55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Source/ios/Converters/TyphoonBundledImageTypeConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ @implementation TyphoonBundledImageTypeConverter

- (id)convert:(NSString*)stringValue
{
return [UIImage imageNamed:stringValue];
__autoreleasing UIImage* image = [UIImage imageNamed:stringValue];
return image;
}


Expand Down
3 changes: 2 additions & 1 deletion Source/ios/Converters/TyphoonUIColorTypeConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ - (id)convert:(NSString*)stringValue
{
NSUInteger red, green, blue;
sscanf([stringValue UTF8String], "#%02X%02X%02X", &red, &green, &blue);
return [UIColor colorWithRed:red / 255.0 green:green / 255.0 blue:blue / 255.0 alpha:1];
__autoreleasing UIColor* color = [UIColor colorWithRed:red / 255.0 green:green / 255.0 blue:blue / 255.0 alpha:1];
return color;
}

@end

0 comments on commit edc1d55

Please sign in to comment.