aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-09-14 13:41:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-14 13:41:23 -0700
commit48392b7c631380bc1000e72457c40ce5e7dc2b1e (patch)
tree828a7315dc7dc3aad55004f4d8a83d860dea700e /tests
parentcd56f812e09fdd8f8322c5c28cbc4423a74b9a0a (diff)
fix leaked generator
Diffstat (limited to 'tests')
-rw-r--r--tests/ImageDecodingTest.cpp3
1 files changed, 2 insertions, 1 deletions
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<SkImageGenerator> gen(SkDecodingImageGenerator::Create(stream.detach(),
+ opts));
REPORTER_ASSERT(reporter, gen->tryGenerateBitmap(&bm));
}
}