From d0f2c4fcf79222d5c6f3c17188a811b0a47833c6 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 17 Jul 2013 20:58:58 +0200 Subject: - now avoids a few unnecessary copy operations during generation of the directory structure - bugfix: circular dependency caused a memory leak - bugfix: removing a single mod lead to the wrong mod being deleted --- src/shared/leaktrace.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/shared/leaktrace.h (limited to 'src/shared/leaktrace.h') diff --git a/src/shared/leaktrace.h b/src/shared/leaktrace.h new file mode 100644 index 00000000..78764260 --- /dev/null +++ b/src/shared/leaktrace.h @@ -0,0 +1,24 @@ +#ifndef LEAKTRACE_H +#define LEAKTRACE_H + + +namespace LeakTrace { + +void TraceAlloc(void *ptr); +void TraceDealloc(void *ptr); + +}; + +#ifdef TRACE_LEAKS + +#define LEAK_TRACE LeakTrace::TraceAlloc(this) +#define LEAK_UNTRACE LeakTrace::TraceDealloc(this) + +#else // TRACE_LEAKS + +#define LEAK_TRACE +#define LEAK_UNTRACE + +#endif // TRACE_LEAKS + +#endif // LEAKTRACE_H -- cgit v1.3.1