Object Class Reference

Object is the base class for implementing reference counting. More...

#include <Object.h>

Inheritance diagram for Object:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void retain (void) const
 Increment the reference count by one.
void release (void) const
 Decrement the reference count by one.

Protected Member Functions

 Object (void)
virtual ~Object (void)

Static Protected Member Functions

static void * operator new (size_t size)
 Overide new so all Objects use ALLOC().
static void operator delete (void *ptr)
 Overide delete so all Objects use DEALLOC().


Detailed Description

The Object class is a base for implementing reference counting. When an object is created, it has a reference count of 1. When an object is retained, the reference count is incremented. When it is released the reference count is decremented, and when the reference count goes to zero the object gets deleted.

Derived classes should supply a static create() function to allocate new objects.

Constructors and destructors should be protected so users must go through the create/retain/release functions.

Definition at line 34 of file Object.h.


Constructor & Destructor Documentation

Object::Object ( void   )  [protected]

virtual Object::~Object ( void   )  [protected, virtual]


Member Function Documentation

void Object::retain ( void   )  const

void Object::release ( void   )  const

When the reference count goes to zero the object gets deleted.

static void* Object::operator new ( size_t  size  )  [static, protected]

static void Object::operator delete ( void *  ptr  )  [static, protected]


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

LizardTech