From b154bc33f55bf7b7ad3fab5841a8d49043e2e979 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 22 Aug 2021 01:08:11 +0200 Subject: [PATCH] Added note on GLFW custom allocators for the future --- src/core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core.c b/src/core.c index 27b6c31b..52245b80 100644 --- a/src/core.c +++ b/src/core.c @@ -3583,6 +3583,17 @@ static bool InitGraphicsDevice(int width, int height) #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) glfwSetErrorCallback(ErrorCallback); + /* + // Setup custom allocators to match raylib ones + const GLFWallocator allocator = { + .allocate = MemAlloc, + .deallocate = MemFree, + .reallocate = MemRealloc, + .user = NULL + }; + + glfwInitAllocator(&allocator); + */ #if defined(__APPLE__) glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);