Removed memory leaks due to GUI_App::app_config, GUI_App::preset_bundle and GUI_App::preset_updater not being deleted

This commit is contained in:
Enrico Turri 2019-06-27 14:42:55 +02:00
parent 75b0f65d79
commit 26c8eed1ae
2 changed files with 13 additions and 0 deletions

View File

@ -141,6 +141,18 @@ GUI_App::GUI_App()
, m_imgui(new ImGuiWrapper())
{}
GUI_App::~GUI_App()
{
if (app_config != nullptr)
delete app_config;
if (preset_bundle != nullptr)
delete preset_bundle;
if (preset_updater != nullptr)
delete preset_updater;
}
bool GUI_App::OnInit()
{
try {

View File

@ -95,6 +95,7 @@ public:
bool initialized() const { return m_initialized; }
GUI_App();
~GUI_App();
static unsigned get_colour_approx_luma(const wxColour &colour);
static bool dark_mode();