diff --git a/base/applications/regedit/main.c b/base/applications/regedit/main.c index c762d6521dd..5ec8ddca2cc 100644 --- a/base/applications/regedit/main.c +++ b/base/applications/regedit/main.c @@ -20,6 +20,10 @@ #include "regedit.h" +#ifdef _DEBUG +#include +#endif + BOOL ProcessCmdLine(WCHAR *cmdline); const WCHAR *reg_class_namesW[] = {L"HKEY_LOCAL_MACHINE", L"HKEY_USERS", @@ -205,6 +209,11 @@ int WINAPI wWinMain(HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); +#ifdef _DEBUG + /* Report any memory leaks on exit */ + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#endif + /* Initialize global strings */ LoadStringW(hInstance, IDS_APP_TITLE, szTitle, ARRAY_SIZE(szTitle)); LoadStringW(hInstance, IDC_REGEDIT_FRAME, szFrameClass, ARRAY_SIZE(szFrameClass));