Răsfoiți Sursa

Fix memory leak in iOS

Cloud Wu 6 ani în urmă
părinte
comite
cb89ae4a90
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      src/bgfx.cpp

+ 3 - 3
src/bgfx.cpp

@@ -12,7 +12,7 @@
 
 
 #include "topology.h"
 #include "topology.h"
 
 
-#if BX_PLATFORM_OSX
+#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
 #	include <objc/message.h>
 #	include <objc/message.h>
 #endif // BX_PLATFORM_OSX
 #endif // BX_PLATFORM_OSX
 
 
@@ -2256,7 +2256,7 @@ namespace bgfx
 		}
 		}
 	}
 	}
 
 
-#if BX_PLATFORM_OSX
+#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
 	struct NSAutoreleasePoolScope
 	struct NSAutoreleasePoolScope
 	{
 	{
 		NSAutoreleasePoolScope()
 		NSAutoreleasePoolScope()
@@ -2280,7 +2280,7 @@ namespace bgfx
 	{
 	{
 		BGFX_PROFILER_SCOPE("bgfx::renderFrame", 0xff2040ff);
 		BGFX_PROFILER_SCOPE("bgfx::renderFrame", 0xff2040ff);
 
 
-#if BX_PLATFORM_OSX
+#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
 		NSAutoreleasePoolScope pool;
 		NSAutoreleasePoolScope pool;
 #endif // BX_PLATFORM_OSX
 #endif // BX_PLATFORM_OSX