From: Benjamin Segovia Date: Fri, 17 Feb 2012 04:54:16 +0000 (+0000) Subject: Made the memory debugger properly output the unfreed allocations X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=389e7040f5e90a7665cc997a145f5ae76db77363;p=contrib%2Fbeignet.git Made the memory debugger properly output the unfreed allocations --- diff --git a/backend/src/sys/alloc.cpp b/backend/src/sys/alloc.cpp index 67dcc15..55a315e 100644 --- a/backend/src/sys/alloc.cpp +++ b/backend/src/sys/alloc.cpp @@ -62,6 +62,7 @@ namespace gbe /*! Store allocation information */ struct MemDebugger { MemDebugger(void) : unfreedNum(0), allocNum(0) {} + ~MemDebugger(void) { this->dumpAlloc(); } void* insertAlloc(void *ptr, const char *file, const char *function, int line); void removeAlloc(void *ptr); void dumpAlloc(void);