From 070844e23446ace52125c9044b6938f609016d0a Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Thu, 20 Jun 2013 14:22:48 +0200 Subject: [PATCH] fix mem-leak analyzer warning Although the analyzer is wrong here (highlighFramesetter property is synthesized), it doesn't hurt to use the instance variables. --- Classes/BITAttributedLabel.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/BITAttributedLabel.m b/Classes/BITAttributedLabel.m index 5ca72d11e5..a06dda6fc3 100755 --- a/Classes/BITAttributedLabel.m +++ b/Classes/BITAttributedLabel.m @@ -826,8 +826,8 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N NSMutableAttributedString *highlightAttributedString = [self.renderedAttributedText mutableCopy]; [highlightAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(id)[self.highlightedTextColor CGColor] range:NSMakeRange(0, highlightAttributedString.length)]; - if (!self.highlightFramesetter) { - self.highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString); + if (!_highlightFramesetter) { + _highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString); } [self drawFramesetter:self.highlightFramesetter attributedString:highlightAttributedString textRange:textRange inRect:textRect context:c];