55 if (--(getCounter().numObjects) < 0)
57 DBG (
"*** Dangling pointer deletion! Class: " << getLeakedObjectClassName());
79 LeakCounter() =
default;
83 if (numObjects.value > 0)
85 DBG (
"*** Leaked objects detected: " << numObjects.value <<
" instance(s) of class " << getLeakedObjectClassName());
98 Atomic<int> numObjects;
101 static const char* getLeakedObjectClassName()
103 return OwnerClass::getLeakedObjectClassName();
106 static LeakCounter& getCounter() noexcept
108 static LeakCounter counter;