Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_leak_detector.cpp
Go to the documentation of this file.
1
/*
2
* Created by Martin on 12/07/2017.
3
*
4
* Distributed under the Boost Software License, Version 1.0. (See accompanying
5
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
*/
7
8
#include "
catch_leak_detector.h
"
9
#include "
catch_interfaces_registry_hub.h
"
10
11
12
#ifdef CATCH_CONFIG_WINDOWS_CRTDBG
13
#include <crtdbg.h>
14
15
namespace
Catch
{
16
17
LeakDetector::LeakDetector
() {
18
int
flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
19
flag |= _CRTDBG_LEAK_CHECK_DF;
20
flag |= _CRTDBG_ALLOC_MEM_DF;
21
_CrtSetDbgFlag(flag);
22
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
23
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
24
// Change this to leaking allocation's number to break there
25
_CrtSetBreakAlloc(-1);
26
}
27
}
28
29
#else
30
31
Catch::LeakDetector::LeakDetector
() {}
32
33
#endif
34
35
Catch::LeakDetector::~LeakDetector
() {
36
Catch::cleanUp
();
37
}
catch_interfaces_registry_hub.h
catch_leak_detector.h
Catch
Definition
231-Cfg-OutputStreams.cpp:32
Catch::cleanUp
void cleanUp()
Definition
catch_registry_hub.cpp:86
Catch::LeakDetector::LeakDetector
LeakDetector()
Definition
catch_leak_detector.cpp:31
Catch::LeakDetector::~LeakDetector
~LeakDetector()
Definition
catch_leak_detector.cpp:35
libraries
sys-vm
external
Catch2
include
internal
catch_leak_detector.cpp
Generated by
1.12.0