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

Unified Diff: tests/TextBlobCacheTest.cpp

Issue 1252593002: fix memory leak in TextBlobCacheTest (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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: tests/TextBlobCacheTest.cpp
diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp
index 1c6596258b5b4bd34f1aec39a295ec14169592a3..e2fa554c9c09757c83823c1cbf0d89e2ca599989 100644
--- a/tests/TextBlobCacheTest.cpp
+++ b/tests/TextBlobCacheTest.cpp
@@ -25,7 +25,8 @@
#include "GrContextFactory.h"
struct TextBlobWrapper {
- explicit TextBlobWrapper(const SkTextBlob* blob) : fBlob(SkRef(blob)) {}
+ // This class assumes it 'owns' the textblob it wraps, and thus does not need to take a ref
+ explicit TextBlobWrapper(const SkTextBlob* blob) : fBlob(blob) {}
TextBlobWrapper(const TextBlobWrapper& blob) : fBlob(SkRef(blob.fBlob.get())) {}
SkAutoTUnref<const SkTextBlob> fBlob;
« 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