Fix multiple memory leaks and stale pooled allocations (#1)

This commit is contained in:
GabsPuNs
2026-05-28 18:58:35 -04:00
parent 4024c3f2a4
commit 160044b48f
10 changed files with 46 additions and 5 deletions

View File

@@ -19,6 +19,18 @@ Screen::Screen() // 4J added
clickedButton = nullptr;
}
Screen::~Screen()
{
delete particles;
particles = nullptr;
for (Button *button : buttons)
{
delete button;
}
buttons.clear();
}
void Screen::render(int xm, int ym, float a)
{
for (Button* button : buttons)