#include <memdbg.h>
Public Member Functions | |
MemoryLeakDetector () | |
~MemoryLeakDetector () | |
Static Private Member Functions | |
static int | DebugAllocHook (int allocType, void *userData, size_t size, int blockType, long requestNumber, const unsigned char *filename, int lineNumber) |
Private Attributes | |
AtomicInt32 | m_AllocationCount |
Static Private Attributes | |
static MemoryLeakDetector * | pDetector = NULL |
Contains the pointer to the only MemoryLeakDetector instance. | |
static _CRT_ALLOC_HOOK | pPrevHook = NULL |
To add memory leak detection to your application, perform the following steps:
BazisLib::MemoryLeakDetector::MemoryLeakDetector | ( | ) | [inline] |
BazisLib::MemoryLeakDetector::~MemoryLeakDetector | ( | ) | [inline] |
If you got a break here, examine the m_AllocationCount parameter
static int BazisLib::MemoryLeakDetector::DebugAllocHook | ( | int | allocType, | |
void * | userData, | |||
size_t | size, | |||
int | blockType, | |||
long | requestNumber, | |||
const unsigned char * | filename, | |||
int | lineNumber | |||
) | [inline, static, private] |
MemoryLeakDetector * BazisLib::MemoryLeakDetector::pDetector = NULL [static, private] |
Contains the pointer to the only MemoryLeakDetector instance.
_CRT_ALLOC_HOOK BazisLib::MemoryLeakDetector::pPrevHook = NULL [static, private] |