From 17bcefeac1fd5d6096c3e06b7c5f96551ea6f0bd Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 18 Mar 2016 12:01:48 +0100 Subject: [PATCH] Fix CGL context not being released until later Fixes #721. --- README.md | 2 ++ src/cocoa_window.m | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index e329fb29..db068683 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,8 @@ does not find Doxygen, the documentation will not be generated. - [Cocoa] Bugfix: Connecting a joystick that reports no name would segfault - [Cocoa] Bugfix: Modifier flags cache was not updated when window became key - [Cocoa] Bugfix: Dead key character composition did not work + - [Cocoa] Bugfix: The CGL context was not released until the autorelease pool + was drained by another function - [X11] Bugfix: Monitor connection and disconnection events were not reported - [X11] Bugfix: Decoding of UTF-8 text from XIM could continue past the end - [X11] Bugfix: An XKB structure was leaked during `glfwInit` diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 99920d03..152bae69 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1038,6 +1038,9 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window) [window->ns.object close]; window->ns.object = nil; + + [_glfw.ns.autoreleasePool drain]; + _glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init]; } void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)