From 8b276757941644fc754887a96a2bd98084fdbe53 Mon Sep 17 00:00:00 2001 From: glowcoil Date: Mon, 18 Nov 2024 00:28:42 -0600 Subject: [PATCH] fix leak of temporary GL context on windows --- src/gl/win.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gl/win.rs b/src/gl/win.rs index 7e4289c8..097eb092 100644 --- a/src/gl/win.rs +++ b/src/gl/win.rs @@ -192,6 +192,7 @@ impl GlContext { }; wglMakeCurrent(hdc_tmp, std::ptr::null_mut()); + wglDeleteContext(hglrc_tmp); ReleaseDC(hwnd_tmp, hdc_tmp); UnregisterClassW(class as *const WCHAR, hinstance); DestroyWindow(hwnd_tmp);