aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/PlatCocoa.mm
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-07-11 15:40:24 +1000
committernyamatongwe <devnull@localhost>2011-07-11 15:40:24 +1000
commit34c751df2e9db01f8209510256831ec14dc6fd9f (patch)
tree7de2f8d024456d49d76ad3ec7c65f41fdacaec0f /cocoa/PlatCocoa.mm
parent15c3e1203d85d128a0432a35a5674763e1cac7b7 (diff)
downloadscintilla-mirror-34c751df2e9db01f8209510256831ec14dc6fd9f.tar.gz
Fix memory leaks for font and color objects.
Diffstat (limited to 'cocoa/PlatCocoa.mm')
-rw-r--r--cocoa/PlatCocoa.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm
index 7e547e67d..6c1c5e8c4 100644
--- a/cocoa/PlatCocoa.mm
+++ b/cocoa/PlatCocoa.mm
@@ -922,6 +922,8 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, con
QuartzTextStyle* style = reinterpret_cast<QuartzTextStyle*>(font_.GetID());
style->setCTStyleColor(color);
+
+ CGColorRelease(color);
textLayout->setText (reinterpret_cast<const UInt8*>(s), len, encoding, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
textLayout->draw(rc.left, ybase);