BIMHome v1.0.0
BIMHome接口文档说明
MemDebug.h
浏览该文件的文档.
1/************************************************************************
2* @file MemDebug.h
3*
4* @brief 内存检查工具类
5*
6* @details 内存检查工具类
7*
8* @author wukx
9*
10* @version v1.0
11*
12* @date 2016.9.29
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef BIMHOMEBASE_MEMDEBUG_H
19#define BIMHOMEBASE_MEMDEBUG_H
20#ifndef BH_GLOBAL_H
21#include <crtdbg.h>
22#include <BHGlobal.h>
23#endif
24
25namespace Base
26{
27#if defined(_MSC_VER)
33 class BaseExport MemCheck
34 {
35 public:
36 MemCheck();
37 ~MemCheck();
38
43 void setNextCheckpoint();
44
50 static bool checkMemory();
51
57 static bool dumpLeaks();
58
65 static bool isValidHeapPointer(const void* ptr);
66
67 private:
68 _CrtMemState s1, s2, s3;
69 };
70
71#endif
72
73} //namespace Base
74
75#endif // BIMHOMEBASE_MEMDEBUG_H
76
Definition BaseFigureFactory.h:24