diff --git a/testing/test_metal_context.mm b/testing/test_metal_context.mm index d2ea2cb3d1bc3..6ac70a2ae25f3 100644 --- a/testing/test_metal_context.mm +++ b/testing/test_metal_context.mm @@ -14,7 +14,7 @@ namespace flutter { TestMetalContext::TestMetalContext() { - auto device = fml::scoped_nsprotocol{[MTLCreateSystemDefaultDevice() retain]}; + auto device = fml::scoped_nsprotocol{MTLCreateSystemDefaultDevice()}; if (!device) { FML_LOG(ERROR) << "Could not acquire Metal device."; return; @@ -82,8 +82,7 @@ } id device = (__bridge id)GetMetalDevice(); - sk_cfp texture = - sk_cfp{[[device newTextureWithDescriptor:texture_descriptor.get()] retain]}; + sk_cfp texture = sk_cfp{[device newTextureWithDescriptor:texture_descriptor.get()]}; if (!texture) { FML_CHECK(false) << "Could not create texture from texture descriptor.";