From 826c2675ec1c2cb60e0ef1842c7a5ff7a548eeaa Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 13 Nov 2006 15:54:49 +0000 Subject: Free backtrace strings even in debug mode by suppressing warnings from DebugMemLeakFinder, to avoid a memory leak (refs #3) --- lib/common/Utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/common/Utils.cpp') diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp index 63d45b5a..ae06dc70 100644 --- a/lib/common/Utils.cpp +++ b/lib/common/Utils.cpp @@ -74,11 +74,13 @@ void DumpStackBacktrace() printf ("Obtained %zd stack frames.\n", size); for(i = 0; i < size; i++) + { printf("%s\n", strings[i]); + } -#ifndef MEMLEAKFINDER_MALLOC_MONITORING_DEFINED +#include "MemLeakFindOff.h" free (strings); -#endif +#include "MemLeakFindOn.h" } #endif -- cgit v1.2.3