diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-24 12:16:57 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-24 12:16:57 +0200 |
commit | a3d2b4475708520207d95d66a6ecd5a35e176ab9 (patch) | |
tree | c4eb363433080866ca8183d7c37cba8b0f681925 | |
parent | e66ea395e424983cb30c11e4050020f8e6f482e1 (diff) |
Change allocation of InspIRCd::Modules to be physically part of the object containing it using fakederef
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | 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<ModuleManager> { public: typedef std::vector<ServiceProvider*> 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; |