diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-10 19:08:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-10 19:08:43 +0000 |
commit | d9174c0a19df923aee08a9f09e43bc4aefb5f9d1 (patch) | |
tree | 5755781401b3253ac624ba2963606eed287670dc /include/base.h | |
parent | 7de6d6cb9d1e93911636b0160929210124138540 (diff) |
Added refcount to classbase, static classbase::id
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4303 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/base.h')
-rw-r--r-- | include/base.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/base.h b/include/base.h index d458021f6..ec6e373ba 100644 --- a/include/base.h +++ b/include/base.h @@ -25,6 +25,8 @@ typedef void* VoidPointer; typedef std::map<std::string,char*> ExtensibleStore; + +extern time_t TIME; /** The base class for all inspircd classes */ @@ -34,12 +36,13 @@ class classbase /** Time that the object was instantiated (used for TS calculation etc) */ time_t age; + static unsigned long id; /** Constructor, * Sets the object's time */ - classbase() { age = time(NULL); } - ~classbase() { } + classbase() { time = TIME; id++; } + ~classbase() { id--; } }; /** class Extensible is the parent class of many classes such as userrec and chanrec. |