From 684d064bb6ac6178a8759b315536fbc9036b18e5 Mon Sep 17 00:00:00 2001 From: qq345386817 Date: Sun, 27 Dec 2015 00:45:54 +0800 Subject: [PATCH] Update NSString+Additions.m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 你好, 一个内存泄露问题. 使用 Instruments 检查出来的. 请更新一下,O(∩_∩)O谢谢! --- VVeboTableViewDemo/NSString+Additions.m | 1 + 1 file changed, 1 insertion(+) diff --git a/VVeboTableViewDemo/NSString+Additions.m b/VVeboTableViewDemo/NSString+Additions.m index 9995383..1056d0d 100755 --- a/VVeboTableViewDemo/NSString+Additions.m +++ b/VVeboTableViewDemo/NSString+Additions.m @@ -175,6 +175,7 @@ - (void)drawInContext:(CGContextRef)context withPosition:(CGPoint)p andFont:(UIF CFRelease(font1); CFRelease(framesetter); CFRelease(ctframe); + CFRelease(style); [[attributedStr mutableString] setString:@""]; CGContextSetTextMatrix(context,CGAffineTransformIdentity); CGContextTranslateCTM(context,0, height);