omg we never freed these contexts

This commit is contained in:
Adam D. Ruppe 2023-08-05 12:12:43 -04:00
parent e91e04be32
commit f2bb114a65
1 changed files with 10 additions and 0 deletions

View File

@ -11767,6 +11767,10 @@ version(Windows) {
} }
void closeWindow() { void closeWindow() {
if(ghRC) {
wglDeleteContext(ghRC);
ghRC = null;
}
DestroyWindow(hwnd); DestroyWindow(hwnd);
} }
@ -14951,6 +14955,12 @@ mixin DynamicLoad!(XRandr, "Xrandr", 2, XRandrLibrarySuccessfullyLoaded) XRandrL
customEventFDRead = -1; customEventFDRead = -1;
customEventFDWrite = -1; customEventFDWrite = -1;
} }
if(glc !is null) {
glXDestroyContext(display, glc);
glc = null;
}
if(buffer) if(buffer)
XFreePixmap(display, buffer); XFreePixmap(display, buffer);
bufferw = bufferh = 0; bufferw = bufferh = 0;