Browse Source

clean up

main
Hendrik Langer 6 years ago
parent
commit
c0e6eb0e2b
  1. 6
      windows-snapshot-tool/src/main.cpp

6
windows-snapshot-tool/src/main.cpp

@ -430,6 +430,12 @@ int CaptureImage(HWND hWnd, const wchar_t* filename) {
//Close the handle for the file that was created //Close the handle for the file that was created
CloseHandle(hFile); CloseHandle(hFile);
// clean up
DeleteObject(hbmScreen);
DeleteObject(hdcMemDC);
ReleaseDC(NULL,hdcScreen);
ReleaseDC(hWnd,hdcWindow);
return 0; return 0;
} }

Loading…
Cancel
Save