From 34cbe3d8a0ea4534bf6405a16db799de135eb8d0 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 52163d772..fdc34b117 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(); } //==========================================================================