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

Unified Diff: tests/ResourceCacheTest.cpp

Issue 1359333004: Fix leak in ResourceCache test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index a4dd2a5940bd66582a9283e3e4c185942020dfb1..0036f839ea8ab8be84c067edbf013d4a808157b3 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -1253,7 +1253,7 @@ static void test_custom_data(skiatest::Reporter* reporter) {
static void test_abandoned(skiatest::Reporter* reporter) {
Mock mock(10, 300);
GrContext* context = mock.context();
- TestResource* resource = new TestResource(context->getGpu());
+ SkAutoTUnref<GrGpuResource> resource(new TestResource(context->getGpu()));
context->abandonContext();
REPORTER_ASSERT(reporter, resource->wasDestroyed());
« 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