mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
fix mem-leak analyzer warning
Although the analyzer is wrong here (highlighFramesetter property is synthesized), it doesn't hurt to use the instance variables.
This commit is contained in:
parent
3c25f25945
commit
070844e234
@ -826,8 +826,8 @@ static inline NSAttributedString * NSAttributedStringBySettingColorFromContext(N
|
|||||||
NSMutableAttributedString *highlightAttributedString = [self.renderedAttributedText mutableCopy];
|
NSMutableAttributedString *highlightAttributedString = [self.renderedAttributedText mutableCopy];
|
||||||
[highlightAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(id)[self.highlightedTextColor CGColor] range:NSMakeRange(0, highlightAttributedString.length)];
|
[highlightAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(id)[self.highlightedTextColor CGColor] range:NSMakeRange(0, highlightAttributedString.length)];
|
||||||
|
|
||||||
if (!self.highlightFramesetter) {
|
if (!_highlightFramesetter) {
|
||||||
self.highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString);
|
_highlightFramesetter = CTFramesetterCreateWithAttributedString((__bridge CFAttributedStringRef)highlightAttributedString);
|
||||||
}
|
}
|
||||||
|
|
||||||
[self drawFramesetter:self.highlightFramesetter attributedString:highlightAttributedString textRange:textRange inRect:textRect context:c];
|
[self drawFramesetter:self.highlightFramesetter attributedString:highlightAttributedString textRange:textRange inRect:textRect context:c];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user