mirror of
https://github.com/Relintai/sfw.git
synced 2025-01-24 06:57:17 +01:00
Avoid memleak.
This commit is contained in:
parent
9ec2133dae
commit
12fe8bbbbd
@ -87,6 +87,7 @@ Application::Application() {
|
|||||||
MemoryPool::setup();
|
MemoryPool::setup();
|
||||||
CoreStringNames::create();
|
CoreStringNames::create();
|
||||||
|
|
||||||
|
// TODO add a helper static method
|
||||||
memnew(AppWindow());
|
memnew(AppWindow());
|
||||||
|
|
||||||
if (!Input::get_singleton()) {
|
if (!Input::get_singleton()) {
|
||||||
@ -143,6 +144,10 @@ Application::~Application() {
|
|||||||
MemoryPool::cleanup();
|
MemoryPool::cleanup();
|
||||||
CoreStringNames::free();
|
CoreStringNames::free();
|
||||||
|
|
||||||
|
// TODO add a helper static method
|
||||||
|
memdelete(AppWindow::get_singleton());
|
||||||
|
memdelete(Input::get_singleton());
|
||||||
|
|
||||||
//SDL_DestroyWindow(window);
|
//SDL_DestroyWindow(window);
|
||||||
|
|
||||||
// window = NULL;
|
// window = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user