From 131037c85f0aa8f1712d06c47d2b7361da0b6c3f Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 1 Aug 2023 20:36:05 -0700 Subject: [PATCH] [Impeller] Fix leak of wrapped TextureMTL objects in the Metal embedder API Fixes https://github.com/flutter/flutter/issues/131682 --- impeller/renderer/backend/metal/texture_mtl.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/impeller/renderer/backend/metal/texture_mtl.mm b/impeller/renderer/backend/metal/texture_mtl.mm index bc57684363a7d..a2c2d95481528 100644 --- a/impeller/renderer/backend/metal/texture_mtl.mm +++ b/impeller/renderer/backend/metal/texture_mtl.mm @@ -44,6 +44,7 @@ new TextureMTL(desc, texture, true), [deletion_proc = std::move(deletion_proc)](TextureMTL* t) { deletion_proc(); + delete t; }); } return std::shared_ptr(new TextureMTL(desc, texture, true));