summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXFont.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r--macosx/tkMacOSXFont.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 2a28f73..feff3bf 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -1208,11 +1208,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;
@@ -1249,7 +1251,6 @@ TkpDrawAngledCharsInContext(
CFRelease(line);
CFRelease(typesetter);
[attributedString release];
- [string release];
[attributes release];
TkMacOSXRestoreDrawingContext(&drawingContext);
}