From 48392b7c631380bc1000e72457c40ce5e7dc2b1e Mon Sep 17 00:00:00 2001 From: reed Date: Mon, 14 Sep 2015 13:41:23 -0700 Subject: [PATCH] fix leaked generator BUG=skia:4335 Review URL: https://codereview.chromium.org/1336353003 --- tests/ImageDecodingTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp index c1ff39fa4e..61c89cbd4a 100644 --- a/tests/ImageDecodingTest.cpp +++ b/tests/ImageDecodingTest.cpp @@ -437,7 +437,8 @@ DEF_TEST(ImprovedBitmapFactory, reporter) { // example of how Android will do this inside their BitmapFactory SkDecodingImageGenerator::Options opts(1, true, kN32_SkColorType); SkBitmap bm; - SkImageGenerator* gen = SkDecodingImageGenerator::Create(stream, opts); + SkAutoTDelete gen(SkDecodingImageGenerator::Create(stream.detach(), + opts)); REPORTER_ASSERT(reporter, gen->tryGenerateBitmap(&bm)); } }