Avoid memleak.

This commit is contained in:
Relintai 2024-01-03 13:54:26 +01:00
parent 9ec2133dae
commit 12fe8bbbbd

View File

@ -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;