1#ifndef INC_MEMORYLEAKINDICATOR_H
2#define INC_MEMORYLEAKINDICATOR_H
39 #pragma warning( disable : 4251 )
42#if __cplusplus >= 201103L
45#include <unordered_map>
47#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
49#elif defined(__GNUC__)
50 #define INT_PTR intptr_t
56#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
57 #ifdef __MEM_LEAK_INDICATOR_EXPORT_DLL
58 #define __mem_leak_indicator_export_dll __declspec(dllexport)
60 #pragma message ( "Benutze Export defines fuer __mem_leak_indicator_export_dll" )
63 #define __mem_leak_indicator_export_dll
65 #pragma message ( "Benutze Import defines fuer __mem_leak_indicator_export_dll" )
68#elif defined(__GNUC__)
69 #ifdef __MEM_LEAK_INDICATOR_EXPORT_DLL
70 #define __mem_leak_indicator_export_dll
72 #define __mem_leak_indicator_export_dll
88 #if __cplusplus >= 201103L
89 #define NULL_PTR nullptr
353 #if __cplusplus >= 201103L
354 std::mutex m_LocalCriticalSection;
760 #pragma warning( default : 4251 )
#define __mem_leak_indicator_export_dll
Definition MemoryLeakIndicator.h:63
Klasse um vergessene Objekte im Speicher im Zugriff zu haben. Inspiriert von Rainer Grimm und Mouaz...
Definition MemoryLeakIndicator.h:278
unsigned long long numberOfProcessedObjects() const
MemoryItem * getSpyObject(INT_PTR ipAddress)
static void destroyAbsolutely()
CRITICAL_SECTION m_LocalCriticalSection
Definition MemoryLeakIndicator.h:356
static int ms_iReferenceCounter
Definition MemoryLeakIndicator.h:420
std::unordered_map< INT_PTR, MemoryItem * >::iterator m_ObjectListIterator
Definition MemoryLeakIndicator.h:381
bool leakMapUseAllowed() const
std::size_t sizeOfObjectList() const
void insertSpyObject(void *pNewObject, char const *chFileName, int iLine)
static bool ms_bUseLeakMap
Definition MemoryLeakIndicator.h:409
void removeSpyObject(void *pObjectToDelete)
std::unordered_map< INT_PTR, MemoryItem * > m_ObjectList
Definition MemoryLeakIndicator.h:370
static LeakMap * create()
static LeakMap * getGlobalLeakMapInstance()
MemoryItem * getSpyObject(SeekMode eMode)
unsigned long long m_ullInsertCounter
Definition MemoryLeakIndicator.h:392
void setLeakMapUseAllowed(bool bAllowed=true)
Klasse, um eine TRACE-Ausgaben auch im Releas-Modus ins Ausgabefenster schreiben zu können....
Definition MemoryLeakIndicator.h:252
void operator()(PCWSTR pszFormat,...)
void operator()(PCSTR pszFormat,...)
Definition MemoryLeakIndicator.h:96
bool TbExceptionMode
Definition MemoryLeakIndicator.h:109
const TiOutput OUTPUT_TRACE
Definition MemoryLeakIndicator.h:186
SeekMode
Definition MemoryLeakIndicator.h:200
@ CURRENT
Definition MemoryLeakIndicator.h:230
@ NEXT
Definition MemoryLeakIndicator.h:220
@ START
Definition MemoryLeakIndicator.h:210
const TbExceptionMode NOTHROW
Definition MemoryLeakIndicator.h:122
void __mem_leak_indicator_export_dll finishMemoryMonitoring(MemSpy::TiOutput iOutput=MemSpy::OUTPUT_CONSOLE)
const TiOutput OUTPUT_NON
Definition MemoryLeakIndicator.h:161
int TiOutput
Definition MemoryLeakIndicator.h:148
const TiOutput OUTPUT_CONSOLE
Definition MemoryLeakIndicator.h:173
const TbExceptionMode THROW
Definition MemoryLeakIndicator.h:133
__mem_leak_indicator_export_dll MemSpy::LeakMap * activateMemoryMonitoring(MemSpy::TbExceptionMode bExceptionMode=MemSpy::THROW)
Referenz auf das instantiierte Objekt mit Dateinamen und Zeile, in der es instantiiert wurde.
Definition MemoryLeakIndicator.h:298
int m_iLineNumber
Definition MemoryLeakIndicator.h:332
INT_PTR m_pItemPtr
Definition MemoryLeakIndicator.h:310
char const * m_FileName
Definition MemoryLeakIndicator.h:321