RefCount Class Reference

RefCount Class Reference

#include <fbxalloc.h>

Class Description

FbxSharedPtr class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which it points gets destroyed automatically when the control leaves a scope and the reference count is 0.

Definition at line 280 of file fbxalloc.h.

Public Member Functions

 RefCount ()
 
 ~RefCount ()
 
void Init ()
 
void IncRef ()
 
int DecRef ()
 

Constructor & Destructor Documentation

RefCount ( )
inline

Definition at line 283 of file fbxalloc.h.

283 { Init(); };
void Init()
Definition: fbxalloc.h:286
~RefCount ( )
inline

Definition at line 284 of file fbxalloc.h.

284 { Init(); };
void Init()
Definition: fbxalloc.h:286

Member Function Documentation

void Init ( )
inline

Definition at line 286 of file fbxalloc.h.

286 { count = 0; }
void IncRef ( )
inline

Definition at line 287 of file fbxalloc.h.

287 { count++; }
int DecRef ( )
inline

Definition at line 288 of file fbxalloc.h.

288 { count--; if (count < 0) count = 0; return count; }

The documentation for this class was generated from the following file: