diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base.cpp | 12 | ||||
-rw-r--r-- | src/inspircd.cpp | 8 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/base.cpp b/src/base.cpp index 2e2dbfb28..15a642eb4 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -11,24 +11,32 @@ * --------------------------------------------------- */ -/* $Core */ - #include "inspircd_config.h" #include "base.h" #include <time.h> #include "inspircd.h" +#include <typeinfo> classbase::classbase() { + if (ServerInstance && ServerInstance->Logs) + ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::+%s @%p", + typeid(*this).name(), (void*)this); } CullResult classbase::cull() { + if (ServerInstance && ServerInstance->Logs) + ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::-%s @%p", + typeid(*this).name(), (void*)this); return CullResult(); } classbase::~classbase() { + if (ServerInstance && ServerInstance->Logs) + ServerInstance->Logs->Log("CULLLIST", DEBUG, "classbase::~%s @%p", + typeid(*this).name(), (void*)this); } CullResult::CullResult() diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c59109724..862aa31d0 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -83,11 +83,9 @@ const char* ExitCodes[] = template<typename T> static void DeleteZero(T*&n) { - if (n != NULL) - { - delete n; - n = NULL; - } + T* t = n; + n = NULL; + delete t; } void InspIRCd::Cleanup() |