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

Unified Diff: bench/subset/SubsetTranslateBench.cpp

Issue 1396113003: Fix codec memory leaks in nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/subset/SubsetTranslateBench.cpp
diff --git a/bench/subset/SubsetTranslateBench.cpp b/bench/subset/SubsetTranslateBench.cpp
index f6f3d4b22290998a11e4881addae2ee5239b8b2c..27c628edde6c1c305241fff34b5cbc8979c5153b 100644
--- a/bench/subset/SubsetTranslateBench.cpp
+++ b/bench/subset/SubsetTranslateBench.cpp
@@ -140,7 +140,7 @@ void SubsetTranslateBench::onDraw(int n, SkCanvas* canvas) {
// We create a color table here to satisfy allocPixels() when the output
// type is kIndex8. It's okay that this is uninitialized since we never
// use it.
- SkColorTable* colorTable = new SkColorTable(colors, 0);
+ SkAutoTUnref<SkColorTable> colorTable(new SkColorTable(colors, 0));
for (int count = 0; count < n; count++) {
int width, height;
SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(fStream));
« no previous file with comments | « no previous file | tools/SkBitmapRegionDecoderInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698