Fixed memory leak with szWinTitleBuffer.

This commit is contained in:
2023-12-16 04:56:02 +03:00
parent e7609c1a34
commit 2fea7600fb

View File

@@ -22,8 +22,9 @@
// wCenterWindow // wCenterWindow
// wCenterWindow.cpp // wCenterWindow.cpp
// TODO: Add Help menuitem into popup menu.
// TODO: Add license info into About dialog. // TODO: Add license info into About dialog.
// TODO: Add 'Center' button into Manual Editing dialog.
// TODO: Fix tray icon that disappears after explorer reboot. // TODO: Fix tray icon that disappears after explorer reboot.
// TODO: Change keyboard low-level hook to RegisterHotKey function. // TODO: Change keyboard low-level hook to RegisterHotKey function.
@@ -237,6 +238,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
logger.Out(L"Exit from the %s() function, msg.wParam = 0x%08X", TEXT(__FUNCTION__), static_cast<int>(msg.wParam)); logger.Out(L"Exit from the %s() function, msg.wParam = 0x%08X", TEXT(__FUNCTION__), static_cast<int>(msg.wParam));
HeapFree(hHeap, NULL, szWinClassBuffer);
HeapFree(hHeap, NULL, szWinTitleBuffer); HeapFree(hHeap, NULL, szWinTitleBuffer);
return static_cast<int>(msg.wParam); return static_cast<int>(msg.wParam);