From c2eedc1d473de6acfea9f9544cc278023dc2d990 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sun, 25 Jan 2026 14:50:16 -0600 Subject: [PATCH] feat(ui): clean up draw layers and batches in CSimpleFrame dtor --- src/ui/simple/CSimpleFrame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ui/simple/CSimpleFrame.cpp b/src/ui/simple/CSimpleFrame.cpp index 9cf321d..83bbd59 100644 --- a/src/ui/simple/CSimpleFrame.cpp +++ b/src/ui/simple/CSimpleFrame.cpp @@ -73,6 +73,14 @@ CSimpleFrame::~CSimpleFrame() { delete this->m_titleRegion; } + for (int32_t layer = 0; layer < NUM_SIMPLEFRAME_DRAWLAYERS; layer++) { + this->m_drawlayers[layer].UnlinkAll(); + + if (this->m_batch[layer]) { + delete this->m_batch[layer]; + } + } + // TODO }