• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

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__, __LINE__);}
00022                 int refCount;
00023 };
00024 
00025 #endif

Generated on Thu Sep 30 2010 01:27:27 for RakNet by  doxygen 1.7.1