Browse Source

Fixed leak report.

Branimir Karadžić 10 years ago
parent
commit
f166412693
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/bgfx.cpp

+ 5 - 2
src/bgfx.cpp

@@ -2142,6 +2142,11 @@ again:
 
 
 		BX_TRACE("Shutdown complete.");
 		BX_TRACE("Shutdown complete.");
 
 
+		if (NULL != s_allocatorStub)
+		{
+			s_allocatorStub->checkLeaks();
+		}
+
 		if (NULL != s_callbackStub)
 		if (NULL != s_callbackStub)
 		{
 		{
 			BX_DELETE(g_allocator, s_callbackStub);
 			BX_DELETE(g_allocator, s_callbackStub);
@@ -2150,8 +2155,6 @@ again:
 
 
 		if (NULL != s_allocatorStub)
 		if (NULL != s_allocatorStub)
 		{
 		{
-			s_allocatorStub->checkLeaks();
-
 			bx::CrtAllocator allocator;
 			bx::CrtAllocator allocator;
 			BX_DELETE(&allocator, s_allocatorStub);
 			BX_DELETE(&allocator, s_allocatorStub);
 			s_allocatorStub = NULL;
 			s_allocatorStub = NULL;