Skip to content

Win32: release window DCs with ReleaseDC instead of DeleteDC - #220

Open
FabienMathieu wants to merge 1 commit into
MicBosi:masterfrom
FabienMathieu:fix/win32-releasedc
Open

FabienMathieu wants to merge 1 commit into
MicBosi:masterfrom
FabienMathieu:fix/win32-releasedc

Conversation

@FabienMathieu

Copy link
Copy Markdown
Contributor

Here is a little fix to be conform with Win32 API.

Device contexts obtained with GetDC() must be released with ReleaseDC(); DeleteDC() is only valid for DCs created with CreateDC(). Using DeleteDC() on a window DC fails and leaks the DC.

Device contexts obtained with GetDC() must be released with ReleaseDC();
DeleteDC() is only valid for DCs created with CreateDC(). Using DeleteDC()
on a window DC fails and leaks the DC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant