From 8456cf5ccd44911f4e56538fe0880dd7fc7cd96d Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 2 Oct 2009 03:15:46 +0000 Subject: Fix valgrind issues and crashes on exit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11794 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modules.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include/modules.h') diff --git a/include/modules.h b/include/modules.h index edfe31007..c9927133f 100644 --- a/include/modules.h +++ b/include/modules.h @@ -408,6 +408,9 @@ class CoreExport Module : public Extensible /** File that this module was loaded from */ std::string ModuleSourceFile; + /** Reference to the dlopen() value + */ + DLLFactory* ModuleDLLFactory; /** Default constructor. * Creates a module class. @@ -416,6 +419,11 @@ class CoreExport Module : public Extensible */ Module(); + /** Clean up prior to destruction + * If you override, you must call this AFTER your module's cleanup + */ + virtual bool cull(); + /** Default destructor. * destroys a module class */ @@ -1507,14 +1515,6 @@ class CoreExport FileReader : public classbase int FileSize(); }; -/** A DLLFactory (designed to load shared objects) containing a - * handle to a module's init_module() function. Unfortunately, - * due to the design of shared object systems we must keep this - * hanging around, as if we remove this handle, we remove the - * shared object file from memory (!) - */ -typedef DLLFactory ircd_module; - /** A list of modules */ typedef std::vector IntModuleList; @@ -1548,7 +1548,7 @@ class CoreExport ModuleManager : public classbase /** List of loaded modules and shared object/dll handles * keyed by module name */ - std::map > Modules; + std::map Modules; enum { PRIO_STATE_FIRST, -- cgit v1.2.3