mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-06-04 09:04:40 +00:00
Fix multiple memory leaks and stale pooled allocations (#1)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user