Permalink
Browse files

Removed memory leaks

  • Loading branch information...
Adrian Kosmaczewski
Adrian Kosmaczewski committed Nov 21, 2010
1 parent a322034 commit aa8fd98ce80052252994885896e15a2466037196
Showing with 4 additions and 1 deletion.
  1. +4 −1 Classes/Views/AKOMultiColumnTextView.m
@@ -231,9 +231,11 @@ - (void)updateAttributedString
if (self.font != nil)
{
+ CTFontRef font = self.font.CTFont;
[self.attributedString addAttribute:(NSString *)kCTFontAttributeName
- value:(id)self.font.CTFont
+ value:(id)font
range:range];
+ CFRelease(font);
}
if (self.color != nil)
@@ -295,6 +297,7 @@ - (void)updateFrames
CFRange frameRange = CTFrameGetVisibleStringRange(frame);
currentIndex += frameRange.length;
+ CFRelease(frame);
}
_finalIndex = currentIndex;

0 comments on commit aa8fd98

Please sign in to comment.