From d9174c0a19df923aee08a9f09e43bc4aefb5f9d1 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 10 Jul 2006 19:08:43 +0000 Subject: Added refcount to classbase, static classbase::id git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4303 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/base.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/base.h') 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 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. -- cgit v1.2.3