diff options
| author | 2009-10-19 20:12:22 +0000 | |
|---|---|---|
| committer | 2009-10-19 20:12:22 +0000 | |
| commit | be10eab6ce68d4f06cc7b14bc2fca35e005ce6b5 (patch) | |
| tree | c22583006f80a8cb86bb15489c196832476cd28a /include/modules.h | |
| parent | Fix implementation of reference to const, use reference counting for Extensib... (diff) | |
Maintain refcount of Module objects to complain about leaked pointers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11925 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
| -rw-r--r-- | include/modules.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/modules.h b/include/modules.h index ad9cf05b8..5e6cf13f5 100644 --- a/include/modules.h +++ b/include/modules.h @@ -106,7 +106,7 @@ struct ModResult { /** If you change the module API in any way, increment this value. * This MUST be a pure integer, with no parenthesis */ -#define API_VERSION 135 +#define API_VERSION 136 class ServerConfig; @@ -266,10 +266,10 @@ class CoreExport Request : public classbase /** This is a pointer to the sender of the message, which can be used to * directly trigger events, or to create a reply. */ - Module* const source; + ModuleRef source; /** The single destination of the Request */ - Module* const dest; + ModuleRef dest; /** Create a new Request * This is for the 'new' way of defining a subclass @@ -296,7 +296,7 @@ class CoreExport Event : public classbase /** This is a pointer to the sender of the message, which can be used to * directly trigger events, or to create a reply. */ - Module* const source; + ModuleRef source; /** The event identifier. * This is arbitary text which should be used to distinguish * one type of event from another. @@ -350,6 +350,8 @@ class ConfigReader; */ class CoreExport Module : public classbase { + unsigned int refcount; + friend class reference_base; public: /** File that this module was loaded from */ |
