From b4c3d2331e8ace7cf2dacd7bafa9cd2746e545c1 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 006219d0e..8bd42c0a1 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(); } //==========================================================================