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()); |