summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 19:08:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 19:08:43 +0000
commitd9174c0a19df923aee08a9f09e43bc4aefb5f9d1 (patch)
tree5755781401b3253ac624ba2963606eed287670dc
parent7de6d6cb9d1e93911636b0160929210124138540 (diff)
Added refcount to classbase, static classbase::id
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4303 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/base.h7
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.