Skip to content

Commit a027c5e

Browse files
committed
Merge pull request #10 from caseybrichardson/master
Fix for a potential memory leak
2 parents 6bd01d2 + be76a69 commit a027c5e

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

UIImageView+Letters/UIImageView+Letters.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ - (UIImage *)imageSnapshotFromText:(NSString *)text backgroundColor:(UIColor *)c
124124
CGPathRef path = CGPathCreateWithEllipseInRect(self.bounds, NULL);
125125
CGContextAddPath(context, path);
126126
CGContextClip(context);
127+
CGPathRelease(path);
127128
}
128129

129130
//

UIImageViewLettersSample/UIImageViewLettersSample/UIImageView+Letters/UIImageView+Letters.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ - (UIImage *)imageSnapshotFromText:(NSString *)text backgroundColor:(UIColor *)c
124124
CGPathRef path = CGPathCreateWithEllipseInRect(self.bounds, NULL);
125125
CGContextAddPath(context, path);
126126
CGContextClip(context);
127+
CGPathRelease(path);
127128
}
128129

129130
//

0 commit comments

Comments
 (0)