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

Unified Diff: tests/PictureTest.cpp

Issue 1210053008: Fix leak in PictureTest.cpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index b235a0cc23e512ffe0c2122c83be19dc25ba61fd..ae1ef6500257ffe63caa8f31df16b3c711f49ce1 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -993,7 +993,8 @@ static void test_cull_rect_reset(skiatest::Reporter* reporter) {
SkPaint paint;
canvas->drawRect(bounds, paint);
canvas->drawRect(bounds, paint);
- const SkBigPicture* picture = recorder.endRecordingAsPicture(bounds)->asSkBigPicture();
+ SkAutoTUnref<const SkPicture> p(recorder.endRecordingAsPicture(bounds));
+ const SkBigPicture* picture = p->asSkBigPicture();
REPORTER_ASSERT(reporter, picture);
SkRect finalCullRect = picture->cullRect();
« 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