From f166412693b0eba2f3262e429ad84598c5591b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 10 Aug 2015 20:15:10 -0700 Subject: [PATCH] Fixed leak report. --- src/bgfx.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index dbe9adac..3b8adf2b 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -2142,6 +2142,11 @@ again: BX_TRACE("Shutdown complete."); + if (NULL != s_allocatorStub) + { + s_allocatorStub->checkLeaks(); + } + if (NULL != s_callbackStub) { BX_DELETE(g_allocator, s_callbackStub); @@ -2150,8 +2155,6 @@ again: if (NULL != s_allocatorStub) { - s_allocatorStub->checkLeaks(); - bx::CrtAllocator allocator; BX_DELETE(&allocator, s_allocatorStub); s_allocatorStub = NULL;