From cc8681a9aa2a4bb9a12623c53f8e554dddcdff87 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 16 Mar 2025 18:54:35 +0100 Subject: [PATCH] Fix memory leak in mixins --- src/common/scripting/frontend/zcc_compile.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/scripting/frontend/zcc_compile.cpp b/src/common/scripting/frontend/zcc_compile.cpp index faef50959..a3296795e 100644 --- a/src/common/scripting/frontend/zcc_compile.cpp +++ b/src/common/scripting/frontend/zcc_compile.cpp @@ -597,8 +597,13 @@ ZCCCompiler::~ZCCCompiler() { delete c; } + for (auto m : Mixins) + { + delete m; + } Structs.Clear(); Classes.Clear(); + Mixins.Clear(); } //==========================================================================