Index: tests/SwizzlerTest.cpp |
diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp |
index 1355f3be8ca1045bb9ce18fb62474e93cbb5d71b..f02f86b68260e864d2ec5af617c4ca08390f160d 100644 |
--- a/tests/SwizzlerTest.cpp |
+++ b/tests/SwizzlerTest.cpp |
@@ -28,7 +28,7 @@ static void check_fill(skiatest::Reporter* r, |
const size_t totalBytes = imageInfo.getSafeSize(rowBytes) + offset; |
// Create fake image data where every byte has a value of 0 |
- SkAutoTDelete<uint8_t> storage((uint8_t*) sk_malloc_throw(totalBytes)); |
+ SkAutoTDeleteArray<uint8_t> storage(SkNEW_ARRAY(uint8_t, totalBytes)); |
memset(storage.get(), 0, totalBytes); |
// Adjust the pointer in order to test on different memory alignments |
uint8_t* imageData = storage.get() + offset; |