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

This commit is contained in:
Zero authored and GitHub committed 2026-05-26 15:47:43 +03:00
1 parent 285fab70b2
commit 544befe162
7 files changed
+39 -2

No files matched your search

+12
View File
@@ -23,6 +23,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)