mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fix "GDI resource leak". (#2694)
"When you no longer need the HBRUSH object, call the DeleteObject function to delete it." https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createsolidbrush 👍
This commit is contained in:
@@ -938,6 +938,7 @@ namespace entry
|
||||
SelectObject(hdc, brush);
|
||||
FillRect(hdc, &rect, brush);
|
||||
ReleaseDC(_hwnd, hdc);
|
||||
DeleteObject(brush);
|
||||
}
|
||||
|
||||
void adjust(HWND _hwnd, uint32_t _width, uint32_t _height, bool _windowFrame)
|
||||
|
||||
Reference in New Issue
Block a user