[Impeller] Fix leak of wrapped TextureMTL objects in the Metal embedder API (flutter/engine#44245)

Fixes https://github.com/flutter/flutter/issues/131682
This commit is contained in:
Jason Simmons
2023-08-02 10:30:42 -07:00
committed by GitHub
parent ad7865d372
commit fcb58723ad

View File

@@ -44,6 +44,7 @@ std::shared_ptr<TextureMTL> TextureMTL::Wrapper(
new TextureMTL(desc, texture, true),
[deletion_proc = std::move(deletion_proc)](TextureMTL* t) {
deletion_proc();
delete t;
});
}
return std::shared_ptr<TextureMTL>(new TextureMTL(desc, texture, true));