forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
25
project/lib_projects/raknet/jni/RaknetSources/RefCountedObj.h
Executable file
25
project/lib_projects/raknet/jni/RaknetSources/RefCountedObj.h
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
/// \file
|
||||
/// \brief \b Reference counted object. Very simple class for quick and dirty uses.
|
||||
///
|
||||
/// This file is part of RakNet Copyright 2003 Jenkins Software LLC
|
||||
///
|
||||
/// Usage of RakNet is subject to the appropriate license agreement.
|
||||
|
||||
|
||||
#ifndef __REF_COUNTED_OBJ_H
|
||||
#define __REF_COUNTED_OBJ_H
|
||||
|
||||
#include "RakMemoryOverride.h"
|
||||
|
||||
/// World's simplest class :)
|
||||
class RefCountedObj
|
||||
{
|
||||
public:
|
||||
RefCountedObj() {refCount=1;}
|
||||
virtual ~RefCountedObj() {}
|
||||
void AddRef(void) {refCount++;}
|
||||
void Deref(void) {if (--refCount==0) RakNet::OP_DELETE(this, _FILE_AND_LINE_);}
|
||||
int refCount;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue