From 3273b04f6f3d8a5725646e3052653ccc4f8c6c91 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Fri, 31 Jan 2014 22:08:31 -0800 Subject: [PATCH] Use aligned allocator for context. --- src/bgfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 56f31e51..1c9497ee 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -733,7 +733,7 @@ namespace bgfx s_threadIndex = BGFX_MAIN_THREAD_MAGIC; - s_ctx = BX_NEW(g_allocator, Context); + s_ctx = BX_ALIGNED_NEW(g_allocator, 16, Context); s_ctx->init(); const uint64_t emulatedCaps = 0 @@ -779,7 +779,7 @@ namespace bgfx Context* ctx = s_ctx; // it's going to be NULLd inside shutdown. ctx->shutdown(); - BX_DELETE(g_allocator, ctx); + BX_ALIGNED_DELETE(g_allocator, 16, ctx); if (NULL != s_callbackStub) {