From a3d2b4475708520207d95d66a6ecd5a35e176ab9 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 24 Jun 2014 12:16:57 +0200 Subject: Change allocation of InspIRCd::Modules to be physically part of the object containing it using fakederef --- include/inspircd.h | 2 +- include/modules.h | 2 +- src/inspircd.cpp | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/inspircd.h b/include/inspircd.h index 91aba7862..e63092f23 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -367,7 +367,7 @@ class CoreExport InspIRCd /** ModuleManager contains everything related to loading/unloading * modules. */ - ModuleManager* Modules; + ModuleManager Modules; /** BanCacheManager is used to speed up checking of restrictions on connection * to the IRCd. diff --git a/include/modules.h b/include/modules.h index 0f8c25691..4f363b2a6 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1078,7 +1078,7 @@ typedef IntModuleList::iterator EventHandlerIter; /** ModuleManager takes care of all things module-related * in the core. */ -class CoreExport ModuleManager +class CoreExport ModuleManager : public fakederef { public: typedef std::vector ServiceList; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 585abd0c7..553e09b73 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -126,7 +126,6 @@ void InspIRCd::Cleanup() DeleteZero(this->FakeClient); DeleteZero(this->Users); DeleteZero(this->XLines); - DeleteZero(this->Modules); DeleteZero(this->SNO); DeleteZero(this->Config); SocketEngine::Deinit(); @@ -252,7 +251,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : this->Users = 0; this->Config = 0; this->SNO = 0; - this->Modules = 0; this->XLines = 0; this->ConfigThread = NULL; this->FakeClient = NULL; @@ -267,7 +265,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : this->Config = new ServerConfig; this->SNO = new SnomaskManager; - this->Modules = new ModuleManager(); dynamic_reference_base::reset_all(); this->XLines = new XLineManager; -- cgit v1.2.3