From d3696e5c4f416369d8d87c02c080c42834f13e13 Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Thu, 20 Jun 2013 14:18:28 +0200 Subject: [PATCH] fix mem leak --- Classes/BITAttributedLabel.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/BITAttributedLabel.m b/Classes/BITAttributedLabel.m index 87d8ba625d..a7b0be3920 100755 --- a/Classes/BITAttributedLabel.m +++ b/Classes/BITAttributedLabel.m @@ -666,6 +666,7 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)self.font.fontName, self.font.pointSize, NULL); CGContextSetLineWidth(c, CTFontGetUnderlineThickness(font)); + CFRelease(font); CGFloat y = roundf(runBounds.origin.y + runBounds.size.height / 2.0f); CGContextMoveToPoint(c, runBounds.origin.x, y); CGContextAddLineToPoint(c, runBounds.origin.x + runBounds.size.width, y);