From 10ad96a39e682816b5e26ccc7c9d8f24ae5e6dbc Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sun, 14 Feb 2010 01:24:20 +0100 Subject: [PATCH] Fix memory leak in ATSUI renderer The wide font was not released properly. --- src/MacVim/MMAtsuiTextView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MacVim/MMAtsuiTextView.m b/src/MacVim/MMAtsuiTextView.m index 8b396ed9..3137ea2c 100644 --- a/src/MacVim/MMAtsuiTextView.m +++ b/src/MacVim/MMAtsuiTextView.m @@ -144,6 +144,7 @@ defaultLineHeightForFont(NSFont *font) [self disposeAtsuStyles]; [font release]; font = nil; + [fontWide release]; fontWide = nil; [defaultBackgroundColor release]; defaultBackgroundColor = nil; [defaultForegroundColor release]; defaultForegroundColor = nil; @@ -288,6 +289,8 @@ defaultLineHeightForFont(NSFont *font) if (!newFont) { if (font) [self setWideFont:font]; } else if (newFont != fontWide) { + [fontWide release]; + float pointSize = [newFont pointSize]; NSFontDescriptor *desc = [newFont fontDescriptor]; NSDictionary *dictWide = [NSDictionary -- 2.11.4.GIT