Don't you just feel bad every time you type 'delete'?
This should fix
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/4787/steps/nanobench/logs/stdio
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1703203003
Review URL: https://codereview.chromium.org/1703203003
diff --git a/bench/SkLinearBitmapPipelineBench.cpp b/bench/SkLinearBitmapPipelineBench.cpp
index ea00638..149e9e2 100644
--- a/bench/SkLinearBitmapPipelineBench.cpp
+++ b/bench/SkLinearBitmapPipelineBench.cpp
@@ -132,7 +132,7 @@
int width = fSrcSize.fWidth;
int height = fSrcSize.fHeight;
- SkPM4f* FPbuffer = new SkPM4f[width * height];
+ SkAutoTMalloc<SkPM4f> FPbuffer(width*height);
SkLinearBitmapPipeline pipeline{fInvert, fXTile, fYTile, fInfo, fBitmap.get(), };
@@ -141,9 +141,6 @@
for (int n = 0; n < 1000*loops; n++) {
pipeline.shadeSpan4f(3, 6, FPbuffer, count);
}
-
- delete [] FPbuffer;
-
}
};
@@ -185,7 +182,7 @@
int width = fSrcSize.fWidth;
int height = fSrcSize.fHeight;
- SkPMColor *buffer4b = new SkPMColor[width * height];
+ SkAutoTMalloc<SkPMColor> buffer4b(width*height);
uint32_t storage[200];
SkASSERT(fPaint.getShader()->contextSize() <= sizeof(storage));
@@ -200,7 +197,6 @@
}
ctx->~Context();
- delete buffer4b;
}
SkPaint fPaint;
SkAutoTUnref<SkImage> fImage;