Skip to content

Commit fd37cd8

Browse files
committed
fix leak of temporary GL context on windows (RustAudio#199)
1 parent c653dc5 commit fd37cd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gl/win.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ impl GlContext {
191191
};
192192

193193
wglMakeCurrent(hdc_tmp, std::ptr::null_mut());
194+
wglDeleteContext(hglrc_tmp);
194195
ReleaseDC(hwnd_tmp, hdc_tmp);
195196
UnregisterClassW(class as *const WCHAR, hinstance);
196197
DestroyWindow(hwnd_tmp);
197198

198199
// Create actual context
199200

200201
let hwnd = handle.hwnd as HWND;
201-
202202
let hdc = GetDC(hwnd);
203203

204204
#[rustfmt::skip]

0 commit comments

Comments
 (0)