Skip to content

Commit

Permalink
UIImage in UIColor, which is of a pattern, should be using StrongId t…
Browse files Browse the repository at this point in the history
…o better manage it's life time
  • Loading branch information
msft-Jeyaram committed Mar 31, 2017
1 parent 31f743c commit 451877b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Frameworks/UIKit/UIColor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ rgb hsv2rgb(hsv in) {
@implementation UIColor {
@public
enum BrushType _type;
UIImage* _image;
StrongId<UIImage> _image;
woc::StrongCF<CGPatternRef> _pattern;
__CGColorQuad _components;
// Note: This should be part of the CGColor struct
Expand Down Expand Up @@ -510,7 +510,7 @@ - (UIColor*)initWithPatternImage:(UIImage*)image {
}

_pattern = _CGPatternCreateFromImage(pImg);
_image = [image retain];
_image = image;
_type = cgPatternBrush;

_components.r = 0.0f;
Expand Down Expand Up @@ -755,14 +755,6 @@ - (BOOL)isEqual:(UIColor*)other {
}
}

/**
@Status Interoperable
*/
- (void)dealloc {
[_image release];
[super dealloc];
}

/**
@Status Stub
*/
Expand Down

0 comments on commit 451877b

Please sign in to comment.