20 #ifndef TESTTOOLS_LEAKCHECK_H
21 #define TESTTOOLS_LEAKCHECK_H
24 #ifdef ATLAS_GCC_CHECKERS
25 #pragma ATLAS no_check_thread_safety
39 # pragma GCC diagnostic ignored "-Wmismatched-new-delete"
45 #include <unordered_set>
51 std::unordered_set<void*>*
allocs =
nullptr;
75 void*
operator new(std::size_t
size){
90 void operator delete (
void*
ptr) noexcept
95 void operator delete (
void*
ptr, size_t) noexcept
117 std::cerr <<
"Leaks!\n";
119 std::cerr <<
" " <<
p <<
"\n";
128 #endif // not TESTTOOLS_LEAKCHECK_H