fix leaked generator

BUG=skia:4335

Review URL: https://codereview.chromium.org/1336353003
This commit is contained in:
reed 2015-09-14 13:41:23 -07:00 committed by Commit bot
parent cd56f812e0
commit 48392b7c63

View File

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