1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

NSGL: Fix display link leaking and left running

Related to #1417.
This commit is contained in:
Camilla Löwy 2019-02-20 22:35:34 +01:00
parent d0e8d06d95
commit ba761ab06e

View File

@ -125,6 +125,14 @@ static void destroyContextNSGL(_GLFWwindow* window)
{
@autoreleasepool {
if (window->context.nsgl.displayLink)
{
if (CVDisplayLinkIsRunning(window->context.nsgl.displayLink))
CVDisplayLinkStop(window->context.nsgl.displayLink);
CVDisplayLinkRelease(window->context.nsgl.displayLink);
}
[window->context.nsgl.pixelFormat release];
window->context.nsgl.pixelFormat = nil;