[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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user