From 12fe8bbbbd9a86f828b264ee6f4e542728f7e17c Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 3 Jan 2024 13:54:26 +0100 Subject: [PATCH] Avoid memleak. --- sfw/render_core/application.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sfw/render_core/application.cpp b/sfw/render_core/application.cpp index d03f6c6..3b02feb 100644 --- a/sfw/render_core/application.cpp +++ b/sfw/render_core/application.cpp @@ -87,6 +87,7 @@ Application::Application() { MemoryPool::setup(); CoreStringNames::create(); + // TODO add a helper static method memnew(AppWindow()); if (!Input::get_singleton()) { @@ -143,6 +144,10 @@ Application::~Application() { MemoryPool::cleanup(); CoreStringNames::free(); + // TODO add a helper static method + memdelete(AppWindow::get_singleton()); + memdelete(Input::get_singleton()); + //SDL_DestroyWindow(window); // window = NULL;