Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

OsclRefCounterDA Class Reference
[OSCL Base]

#include <oscl_refcounter.h>

Inheritance diagram for OsclRefCounterDA:

OsclRefCounter

Public Methods

 OsclRefCounterDA (OsclAny *p, OsclDestructDealloc *dealloc)
virtual ~OsclRefCounterDA ()
void addRef ()
void removeRef ()
uint32 getCount ()

Detailed Description

Implementation of an OsclRefCounter that uses a dynamically created deallocator.


Constructor & Destructor Documentation

OsclRefCounterDA::OsclRefCounterDA OsclAny   p,
OsclDestructDealloc   dealloc
[inline]
 

Constructor Takes a pointer to the buffer to track, and a pointer to the deallocator object which will be used to delete the buffer.

When the reference count reaches zero, the buffer will be deleted by the deallocator. Also, the OsclRefCounter object (this) will self-destruct when the reference count is zero. In some cases the OsclRefCounter object will be part of the buffer being deleted. For such cases, the object pointer must be equal to the buffer pointer given at construction. If the object is not part of the buffer being deleted, it will self-destruct with a call to delete().

Parameters:
p  pointer to the buffer to track
dealloc  pointer to the deallocator to use when deleting the buffer

virtual OsclRefCounterDA::~OsclRefCounterDA   [inline, virtual]
 

Destructor empty


Member Function Documentation

void OsclRefCounterDA::addRef   [inline, virtual]
 

Add to the reference count

Implements OsclRefCounter.

uint32 OsclRefCounterDA::getCount   [inline, virtual]
 

Gets the current number of references

Implements OsclRefCounter.

void OsclRefCounterDA::removeRef   [inline, virtual]
 

Remove from the reference count

Implements OsclRefCounter.


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310