diff --git a/src/console/Screen.cpp b/src/console/Screen.cpp index b0816d2..4eed1e9 100644 --- a/src/console/Screen.cpp +++ b/src/console/Screen.cpp @@ -40,6 +40,16 @@ static CImVector s_colorArray[] = { { 0x00, 0x00, 0x00, 0xC0 }, // BACKGROUND_COLOR }; +CONSOLELINE::~CONSOLELINE() { + if (this->buffer) { + STORM_FREE(this->buffer); + } + + if (this->fontPointer) { + GxuFontDestroyString(this->fontPointer); + } +} + void DrawBackground() { uint16_t indices[] = { 0, 1, 2, 3 diff --git a/src/console/Screen.hpp b/src/console/Screen.hpp index 787d1b9..3d33654 100644 --- a/src/console/Screen.hpp +++ b/src/console/Screen.hpp @@ -16,6 +16,9 @@ class CONSOLELINE : public TSLinkedNode { uint32_t inputstart; COLOR_T colorType; CGxString* fontPointer; + + // Member functions + ~CONSOLELINE(); }; void ConsoleScreenAnimate(float elapsedSec);