Prevent non-freed memory

This commit is contained in:
Lorenzooone
2024-04-19 16:59:29 +02:00
parent 2149188c33
commit 0982853ee4
2 changed files with 9 additions and 0 deletions

View File

@@ -19,6 +19,14 @@ TextRectangle::TextRectangle(bool font_load_success, sf::Font &text_font) {
this->reset_data(this->future_data);
}
TextRectangle::~TextRectangle() {
delete this->base_bg_color;
delete this->selected_bg_color;
delete this->success_bg_color;
delete this->warning_bg_color;
delete this->error_bg_color;
}
void TextRectangle::setSize(int width, int height) {
this->width = width;
this->height = height;