diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-01 20:53:33 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-01 20:53:33 +0000 |
commit | 19c2894bc74567d28716026ad400408d79ceae2f (patch) | |
tree | a3c8543603aefa9fc0ec44ea3158125d65c98da5 /gm/gammatext.cpp | |
parent | 302cffba86a188373c99833d83392f33e6014542 (diff) |
Fix memory leak in gammatext GM.
Review URL: https://codereview.appspot.com/6458055
git-svn-id: http://skia.googlecode.com/svn/trunk@4902 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gammatext.cpp')
-rw-r--r-- | gm/gammatext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp index bbd2409af8..3e3163ca4a 100644 --- a/gm/gammatext.cpp +++ b/gm/gammatext.cpp @@ -47,7 +47,7 @@ static CGContextRef makeCG(const SkBitmap& bm) { CGContextRef cg = CGBitmapContextCreate(bm.getPixels(), bm.width(), bm.height(), 8, bm.rowBytes(), space, BITMAP_INFO_RGB); CFRelease(space); - + CGContextSetAllowsFontSubpixelQuantization(cg, false); CGContextSetShouldSubpixelQuantizeFonts(cg, false); @@ -185,6 +185,9 @@ protected: } x += SkIntToScalar(1024) / SK_ARRAY_COUNT(fg); } +#ifdef SK_BUILD_FOR_MAC + CGContextRelease(cg); +#endif } private: |