[Box Backup-commit] COMMIT r1152 - box/chris/merge/lib/common

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Mon, 13 Nov 2006 15:53:29 +0000


Author: chris
Date: 2006-11-13 15:53:29 +0000 (Mon, 13 Nov 2006)
New Revision: 1152

Modified:
   box/chris/merge/lib/common/Box.h
Log:
Declare MEMLEAKFINDER_INIT and MEMLEAKFINDER_NO_LEAKS macros which 
reference function and class in DebugMemLeakFinder only in debug mode 
(refs #3)


Modified: box/chris/merge/lib/common/Box.h
===================================================================
--- box/chris/merge/lib/common/Box.h	2006-11-13 15:50:21 UTC (rev 1151)
+++ box/chris/merge/lib/common/Box.h	2006-11-13 15:53:29 UTC (rev 1152)
@@ -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																\