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

Unified Diff: tests/PDFPrimitivesTest.cpp

Issue 23003035: Fix leaked SkPDFDevice in PDFPrimitivesTest.cpp (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PDFPrimitivesTest.cpp
===================================================================
--- tests/PDFPrimitivesTest.cpp (revision 10896)
+++ tests/PDFPrimitivesTest.cpp (working copy)
@@ -250,7 +250,7 @@
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698