OpenZWave Library  1.6.1914
Public Member Functions | Protected Member Functions | List of all members
OpenZWave::Internal::Platform::Ref Class Reference

#include <Ref.h>

+ Inheritance diagram for OpenZWave::Internal::Platform::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::Internal::Platform::Ref::Ref ( )

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

See also
AddRef, Release

◆ ~Ref()

virtual OpenZWave::Internal::Platform::Ref::~Ref ( )

Member Function Documentation

◆ AddRef()

void OpenZWave::Internal::Platform::Ref::AddRef ( )

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()

int32 OpenZWave::Internal::Platform::Ref::Release ( )

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

See also

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