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

Unified Diff: tests/SurfaceTest.cpp

Issue 872183002: Don't leak image in Surface test. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/SurfaceTest.cpp
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 94490144ed8fa4b654a739cc350da173ffa95d1b..8cd50ddd33bd8ba25df6683acea75fa94dfbd4d6 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -482,7 +482,7 @@ static void test_surface_budget(skiatest::Reporter* reporter, GrContext* context
SkASSERT(surface);
REPORTER_ASSERT(reporter, sbudgeted == is_budgeted(surface));
- SkImage* image = surface->newImageSnapshot(ibudgeted);
+ SkAutoTUnref<SkImage> image(surface->newImageSnapshot(ibudgeted));
tfarina 2015/01/24 22:03:11 lgtm
// Initially the image shares a texture with the surface, and the surface decides
// whether it is budgeted or not.
« 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