MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / LeakDetector

Method LeakDetector

unittests/catch.hpp:7671–7680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7669namespace Catch {
7670
7671 LeakDetector::LeakDetector() {
7672 int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
7673 flag |= _CRTDBG_LEAK_CHECK_DF;
7674 flag |= _CRTDBG_ALLOC_MEM_DF;
7675 _CrtSetDbgFlag(flag);
7676 _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
7677 _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
7678 // Change this to leaking allocation's number to break there
7679 _CrtSetBreakAlloc(-1);
7680 }
7681}
7682
7683#else

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected