3 #ifndef SPECTMORPH_LEAK_DEBUGGER_HH 4 #define SPECTMORPH_LEAK_DEBUGGER_HH 17 std::map<void *, int> ptr_map;
19 std::function<void()> cleanup_function;
21 void ptr_add (
void *p);
22 void ptr_del (
void *p);
25 LeakDebugger (
const std::string& name, std::function<
void()> cleanup_function =
nullptr);
28 template<
class T>
void add (T *instance) { ptr_add (static_cast<void *> (instance)); }
29 template<
class T>
void del (T *instance) { ptr_del (static_cast<void *> (instance)); }
Definition: smleakdebugger.hh:14
Definition: smadsrenvelope.hh:8