blob: b0d041293227c291b2f4381e46ae93b35f616acd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef LEAKTRACE_H
#define LEAKTRACE_H
namespace LeakTrace {
void TraceAlloc(void* ptr, const char* functionName, int line);
void TraceDealloc(void* ptr);
}; // namespace LeakTrace
#ifdef TRACE_LEAKS
#define LEAK_TRACE LeakTrace::TraceAlloc(this, __FUNCTION__, __LINE__)
#define LEAK_UNTRACE LeakTrace::TraceDealloc(this)
#else // TRACE_LEAKS
#define LEAK_TRACE
#define LEAK_UNTRACE
#endif // TRACE_LEAKS
#endif // LEAKTRACE_H
|