diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-20 00:55:22 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-20 00:55:22 +0000 |
commit | 9facfd70b5a8ca4dca16fc93f6fcfe1c2bf6ce0f (patch) | |
tree | e12503f0d5699fc367140b996ea552d4672eb885 /src/modules.cpp | |
parent | 3bd628e8a1b211e610c21571e81489d07f4b217b (diff) |
Use custom allocater to decide if refcountbase was allocated on the heap and should be deleted when refcount reaches zero
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11928 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index 856addbf5..7e4e0ec68 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -51,14 +51,14 @@ void Event::Send() // These declarations define the behavours of the base class Module (which does nothing at all) -Module::Module() : refcount(0) { } +Module::Module() : refcount(1) { } CullResult Module::cull() { return classbase::cull(); } Module::~Module() { - if (refcount) + if (refcount != 1) ServerInstance->Logs->Log("MODULE", DEFAULT, "References remain to destructed module " + ModuleSourceFile); } |