X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fbase.cpp;h=cf28f8e7d34375359f1306d37ebde1c79af7415f;hb=48869b38e938de4d8dd4cdff486b10348e81f7b6;hp=a4c3e887e39bb13edde8d7a7a2b655e05f3bd94f;hpb=a5fe50aca04ca554d313e7361c571c6a497a9c4e;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/base.cpp b/src/base.cpp index a4c3e887e..cf28f8e7d 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -186,20 +186,24 @@ Extensible::Extensible() } CullResult Extensible::cull() +{ + FreeAllExtItems(); + return classbase::cull(); +} + +void Extensible::FreeAllExtItems() { for(ExtensibleStore::iterator i = extensions.begin(); i != extensions.end(); ++i) { i->first->free(i->second); } extensions.clear(); - return classbase::cull(); } Extensible::~Extensible() { if (!extensions.empty() && ServerInstance && ServerInstance->Logs) - ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, - "Extensible destructor called without cull @%p", (void*)this); + ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Extensible destructor called without cull @%p", (void*)this); } LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod) @@ -312,4 +316,3 @@ ModuleException::ModuleException(const std::string &message, Module* who) : CoreException(message, who ? who->ModuleSourceFile : "A Module") { } -