summaryrefslogtreecommitdiff
path: root/lib/common
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2006-11-13 15:53:29 +0000
committerChris Wilson <chris+github@qwirx.com>2006-11-13 15:53:29 +0000
commitf0095d3b907bd38be741ceca9f5fa6998738f660 (patch)
tree743bebbaf30fcdb0ce81aa8e3fc2495e876e39c6 /lib/common
parentc238a4fdfc485654d8b1181fbf220d8e560bddd3 (diff)
Declare MEMLEAKFINDER_INIT and MEMLEAKFINDER_NO_LEAKS macros which
reference function and class in DebugMemLeakFinder only in debug mode (refs #3)
Diffstat (limited to 'lib/common')
-rw-r--r--lib/common/Box.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/common/Box.h b/lib/common/Box.h
index eb33673c..86c34acb 100644
--- a/lib/common/Box.h
+++ b/lib/common/Box.h
@@ -95,16 +95,19 @@
// Memory leak testing
#include "MemLeakFinder.h"
#define MEMLEAKFINDER_NOT_A_LEAK(x) memleakfinder_notaleak(x);
+ #define MEMLEAKFINDER_NO_LEAKS MemLeakSuppressionGuard _guard;
+ #define MEMLEAKFINDER_INIT memleakfinder_init();
#define MEMLEAKFINDER_START {memleakfinder_global_enable = true;}
- #define MEMLEAKFINDER_STOP {memleakfinder_global_enable = false;}
+ #define MEMLEAKFINDER_STOP {memleakfinder_global_enable = false;}
#else
#define DEBUG_NEW new
#define MEMLEAKFINDER_NOT_A_LEAK(x)
+ #define MEMLEAKFINDER_NO_LEAKS
+ #define MEMLEAKFINDER_INIT
#define MEMLEAKFINDER_START
#define MEMLEAKFINDER_STOP
#endif
-
#define THROW_EXCEPTION(type, subtype) \
{ \
OPTIONAL_DO_BACKTRACE \