Shadowrun: Awakened 29 September 2011 - Build 871
RefCountedObj.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #ifndef __REF_COUNTED_OBJ_H
00010 #define __REF_COUNTED_OBJ_H
00011 
00012 #include "RakMemoryOverride.h"
00013 
00015 class RefCountedObj
00016 {
00017     public:
00018         RefCountedObj() {refCount=1;}
00019         virtual ~RefCountedObj() {}
00020         void AddRef(void) {refCount++;}
00021         void Deref(void) {if (--refCount==0) RakNet::OP_DELETE(this, _FILE_AND_LINE_);}
00022         int refCount;
00023 };
00024 
00025 #endif

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net