diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-27 13:49:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-27 13:49:13 (GMT) |
commit | 2e20e3d127da5e8a49e124ff975a94b375367526 (patch) | |
tree | 4f4a7b257ea3d53e1938bcc45dd7809c901ba0f2 /macosx/tkMacOSXFont.c | |
parent | 93c4ec91c7a95daf25a4177e3d5a3bd2b1e4d7c1 (diff) | |
parent | 668bf78c9bc16a0ba316241f1e2262b9ce4a9a30 (diff) | |
download | tk-2e20e3d127da5e8a49e124ff975a94b375367526.zip tk-2e20e3d127da5e8a49e124ff975a94b375367526.tar.gz tk-2e20e3d127da5e8a49e124ff975a94b375367526.tar.bz2 |
Merge enhanced-index
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r-- | macosx/tkMacOSXFont.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c index 22ac5a8..6721ed5 100644 --- a/macosx/tkMacOSXFont.c +++ b/macosx/tkMacOSXFont.c @@ -1310,11 +1310,13 @@ TkpDrawAngledCharsInContext( TkSetMacColor(gc->foreground, &fg); attributes = [fontPtr->nsAttributes mutableCopy]; [attributes setObject:(id)fg forKey:(id)kCTForegroundColorAttributeName]; + CFRelease(fg); nsFont = [attributes objectForKey:NSFontAttributeName]; [nsFont setInContext:GET_NSCONTEXT(context, NO)]; CGContextSetTextMatrix(context, CGAffineTransformIdentity); attributedString = [[NSAttributedString alloc] initWithString:string attributes:attributes]; + [string release]; typesetter = CTTypesetterCreateWithAttributedString( (CFAttributedStringRef)attributedString); textX += (CGFloat) macWin->xOff; @@ -1351,7 +1353,6 @@ TkpDrawAngledCharsInContext( CFRelease(line); CFRelease(typesetter); [attributedString release]; - [string release]; [attributes release]; TkMacOSXRestoreDrawingContext(&drawingContext); } |