Fix minor valgrind-found memory leaks
https://codereview.chromium.org/12440066/
git-svn-id: http://skia.googlecode.com/svn/trunk@8297 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/Matrix44Test.cpp b/tests/Matrix44Test.cpp
index 269e359..bdeafd4 100644
--- a/tests/Matrix44Test.cpp
+++ b/tests/Matrix44Test.cpp
@@ -80,6 +80,8 @@
static void test_constructor(skiatest::Reporter* reporter) {
// Allocate a matrix on the heap
SkMatrix44* placeholderMatrix = new SkMatrix44();
+ SkAutoTDelete<SkMatrix44> deleteMe(placeholderMatrix);
+
for (int row = 0; row < 4; ++row) {
for (int col = 0; col < 4; ++col) {
placeholderMatrix->setDouble(row, col, row * col);
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index cc89d6b..7f6bc34 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -225,7 +225,7 @@
// and there is no assert on input data in Debug mode.
static void test_issue1083() {
SkISize pageSize = SkISize::Make(100, 100);
- SkPDFDevice* dev = new SkPDFDevice(pageSize, pageSize, SkMatrix::I());
+ SkAutoTUnref<SkPDFDevice> dev(new SkPDFDevice(pageSize, pageSize, SkMatrix::I()));
SkCanvas c(dev);
SkPaint paint;