Browse Source

Display GDI and USER object counts when dumping memory leaks

pull/886/head
Valentin Radu 4 years ago
parent
commit
65f86a236f
  1. 7
      ExplorerPatcher/dllmain.c

7
ExplorerPatcher/dllmain.c

@ -4066,6 +4066,13 @@ void WINAPI LoadSettings(LPARAM lParam) @@ -4066,6 +4066,13 @@ void WINAPI LoadSettings(LPARAM lParam)
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDOUT);
_CrtDumpMemoryLeaks();
printf("[Memcheck] Memory leak dump complete.\n");
printf(
"[Memcheck] Objects in use:\nGDI\tGDIp\tUSER\tUSERp\n%d\t%d\t%d\t%d\n",
GetGuiResources(GetCurrentProcess(), GR_GDIOBJECTS),
GetGuiResources(GetCurrentProcess(), GR_GDIOBJECTS_PEAK),
GetGuiResources(GetCurrentProcess(), GR_USEROBJECTS),
GetGuiResources(GetCurrentProcess(), GR_USEROBJECTS_PEAK)
);
#endif
dwTemp = 0;
RegSetValueExW(

Loading…
Cancel
Save