fix memory leak in TextBlobCacheTest

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1252593002
This commit is contained in:
joshualitt 2015-07-23 08:09:35 -07:00 committed by Commit bot
parent 398260262f
commit bedf7e5c0e

View File

@ -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;