aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TextBlobCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-23 08:09:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-23 08:09:35 -0700
commitbedf7e5c0e4a16b5be1426cecaf0bdc2d3071352 (patch)
treee09fea80bb3951b9d517408f35a15476564cfeb8 /tests/TextBlobCacheTest.cpp
parent398260262f8508687614ec496a23b8152bcdc967 (diff)
fix memory leak in TextBlobCacheTest
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1252593002
Diffstat (limited to 'tests/TextBlobCacheTest.cpp')
-rw-r--r--tests/TextBlobCacheTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp
index 1c6596258b..e2fa554c9c 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;