Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1176)

Unified Diff: tests/ImageDecodingTest.cpp

Issue 1336353003: fix leaked generator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index c1ff39fa4e1e80f4bced140853a0c8f5fa00bb7b..61c89cbd4a5f9c465dfaf1b2cd081d5bb1d706e3 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));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698