[MSPAINT][NOTEPAD][REGEDIT] Don't use CRTDBG for these apps (#5788)

Don't include <crtdbg.h>.
Don't use _CrtSetDbgFlag.
This commit is contained in:
Katayama Hirofumi MZ 2023-10-12 22:53:02 +09:00 committed by GitHub
parent 70d5c864bc
commit 9a51c8e6c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 27 deletions

View file

@ -299,11 +299,6 @@ HWND CMainWindow::DoCreate()
INT WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nCmdShow)
{
#ifdef _DEBUG
// Report any memory leaks on exit
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
g_hinstExe = hInstance;
// Initialize common controls library

View file

@ -26,10 +26,6 @@
#include <shellapi.h>
#include <htmlhelp.h>
#include "atlimagedx.h"
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include <debug.h>

View file

@ -564,11 +564,6 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
static const TCHAR className[] = _T("Notepad");
static const TCHAR winName[] = _T("Notepad");
#ifdef _DEBUG
/* Report any memory leaks on exit */
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
switch (GetUserDefaultUILanguage())
{
case MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT):

View file

@ -25,10 +25,6 @@
#include <tchar.h>
#include <stdlib.h>
#include <malloc.h>
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include "dialog.h"
#include "notepad_res.h"

View file

@ -205,11 +205,6 @@ 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));

View file

@ -11,10 +11,6 @@
#include <shellapi.h>
#include <strsafe.h>
#include <stdlib.h>
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif
#include "main.h"
#include "hexedit.h"