* Holds all extensible metadata for the class.
*/
ExtensibleStore extensions;
+
+ /** True if this Extensible has been culled.
+ * A warning is generated if false on destruction.
+ */
+ unsigned int culled:1;
public:
/**
* Get the extension items for iteraton (i.e. for metadata sync during netburst)
}
}
-static struct DummyExtensionItem : LocalExtItem
-{
- DummyExtensionItem() : LocalExtItem("", NULL) {}
- void free(void*) {}
-} dummy;
-
Extensible::Extensible()
+ : culled(false)
{
- extensions[&dummy] = NULL;
}
CullResult Extensible::cull()
{
FreeAllExtItems();
+ culled = true;
return classbase::cull();
}
Extensible::~Extensible()
{
- if (!extensions.empty() && ServerInstance && ServerInstance->Logs)
+ if ((!extensions.empty() || !culled) && ServerInstance && ServerInstance->Logs)
ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Extensible destructor called without cull @%p", (void*)this);
}