SimpleCountedObject Struct Reference

Simple counted object. More...

#include <countedptr.hpp>

Inheritance diagram for SimpleCountedObject:
AIObject ScriptFileInfo AIAccounting AIAirport AIBase AIBaseStation AIBridge AICargo AICompany AIDate AIEngine AIError AIEvent AIEventController AIExecMode AIGameSettings AIGroup AIIndustry AIIndustryType AIList AILog AIMap AIMarine AIOrder AIRail AIRoad AISign AISubsidy AITestMode AITile AITown AITunnel AIVehicle AIFileInfo

Public Member Functions

virtual int32 AddRef ()
virtual int32 Release ()
virtual void FinalRelease ()

Data Fields

int32 m_ref_cnt

Detailed Description

Simple counted object.

Use it as base of your struct/class if you want to use basic reference counting. Your struct/class will destroy and free itself when last reference to it is released (using Relese() method). The initial reference count (when it is created) is zero (don't forget AddRef() at least one time if not using CCountedPtr<T>.

See also:
misc/countedobj.cpp for implementation.

Definition at line 149 of file countedptr.hpp.


The documentation for this struct was generated from the following files:

Generated on Sun Jan 9 16:03:19 2011 for OpenTTD by  doxygen 1.6.1