aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PDFPrimitivesTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-26 11:10:13 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-26 11:10:13 +0000
commit57c5672901674ea904025f9552c4603f8a83d28e (patch)
treeb279ffe435270410c0464ab7496e0fb8c5132cbf /tests/PDFPrimitivesTest.cpp
parent69b130268932db4ae61672579127aff76531412d (diff)
Fix leaked SkPDFDevice in PDFPrimitivesTest.cpp
Diffstat (limited to 'tests/PDFPrimitivesTest.cpp')
-rw-r--r--tests/PDFPrimitivesTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 0e9cbde7b3..b4ba0526a1 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -250,7 +250,7 @@ static void setup_bitmap(SkBitmap* bitmap, int width, int height) {
static void TestImage(skiatest::Reporter* reporter, const SkBitmap& bitmap,
const char* expected, bool useDCTEncoder) {
SkISize pageSize = SkISize::Make(bitmap.width(), bitmap.height());
- SkPDFDevice* dev = new SkPDFDevice(pageSize, pageSize, SkMatrix::I());
+ SkAutoTUnref<SkPDFDevice> dev(new SkPDFDevice(pageSize, pageSize, SkMatrix::I()));
if (useDCTEncoder) {
dev->setDCTEncoder(encode_to_dct_stream);