OpenZWave::Ref Class Reference

`#include <Ref.h>`

Inheritance diagram for OpenZWave::Ref:

## Public Member Functions

| Ref ()
void | AddRef ()
int32 | Release ()

## Protected Member Functions

virtual | ~Ref ()

## Detailed Description

Provides reference counting for objects. Any class wishing to include reference counting should be derived from Ref. Derived classes must declare their destructor as protected virtual. On construction, the reference count is set to one. Calls to AddRef increment the count. Calls to Release decrement the count. When the count reaches zero, the object is deleted.

## Constructor & Destructor Documentation

## Ref()

OpenZWave::Ref::Ref | ( |  | ) |

inline

Initializes the RefCount to one. The object can only be deleted through a call to Release.

See also
  AddRef, Release

## ~Ref()

virtual OpenZWave::Ref::~Ref | ( |  | ) |

inline protected virtual

## Member Function Documentation

## AddRef()

void OpenZWave::Ref::AddRef | ( |  | ) |

inline

Increases the reference count of the object. Every call to AddRef requires a matching call to Release before the object will be deleted.

See also
  Release

## Release()

int32 OpenZWave::Ref::Release | ( |  | ) |

inline

Removes a reference to an object. If this was the last reference to the message, the object is deleted.

See also
  AddRef

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

- Ref.h