Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: src/ports/SkFontHost_mac.cpp

Issue 393513003: Leaking CGBitmapContext in SkFontHost_mac (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fixup Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_mac.cpp
diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp
index 21a2b956148b8ac53a17d2a3b94498ffdbf51e18..7f3a3c1ef4d86871d8fac7ddf4f8ddf2c640bac7 100755
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -82,9 +82,10 @@ public:
~AutoCFRelease() { CFSafeRelease(fCFRef); }
void reset(CFRef that = NULL) {
- CFSafeRetain(that);
- CFSafeRelease(fCFRef);
- fCFRef = that;
+ if (that != fCFRef) {
+ CFSafeRelease(fCFRef);
+ fCFRef = that;
+ }
}
AutoCFRelease& operator =(CFRef that) {
bungeman-skia 2014/07/14 17:38:30 I think I actually wrote this, but now I hate this
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698