[iOS] Fixes context memory leaks when using Metal (flutter/engine#25389)

This commit is contained in:
Wu Zhong
2021-04-08 07:16:11 +08:00
committed by GitHub
parent a9f43a6f7d
commit 3dc853c388

View File

@@ -14,7 +14,7 @@ namespace flutter {
IOSContextMetal::IOSContextMetal() {
darwin_context_metal_ = fml::scoped_nsobject<FlutterDarwinContextMetal>{
[[[FlutterDarwinContextMetal alloc] initWithDefaultMTLDevice] retain]};
[[FlutterDarwinContextMetal alloc] initWithDefaultMTLDevice]};
if (!darwin_context_metal_) {
return;