| Face Engine SDK 5.34.0 A face detection, recognition and tracking engine.

Public Member Functions | List of all members
fsdk::IRefCounted Struct Referenceabstract
SDK core interfaces

Base strong reference counted object interface. More...

`#include <IRefCounted.h>`

Inheritance diagram for fsdk::IRefCounted:

## Public Member Functions
virtual int32_t | retain () noexcept=0
| Increase strong reference count. More...
virtual int32_t | retainLocked () noexcept=0
| Increase strong reference count thread safely. More...
virtual int32_t | release () noexcept=0
| Decrease strong reference count. More...
virtual int32_t | getRefCount () const noexcept=0
| Get actual strong reference count. More...
virtual int32_t | retainWeak () noexcept=0
| Increase weak reference count. More...
virtual int32_t | releaseWeak () noexcept=0
| Decrease weak reference count. More...
virtual int32_t | getWeakRefCount () const noexcept=0
| Get actual weak reference count. More...

## Detailed Description

Base strong reference counted object interface.

Implements common reference counting routines to control object life time.

Use retain() to notify the object you are going to use it, thus sharing it's ownership. Use release() to release object reference when it is no longer needed. Use getRefCount() to obtain current reference count of the object.

All objects are created with initial strong reference count of 1 and weak reference count of 1.

When object reference count drops to 0, it's destroyed and deallocated automatically.

All functions of this interface have thread safe implementations in SDK classes.

Note
  You should always destroy reference counted objects by calling appropriate release() function and never try to call delete on them directly!

## Member Function Documentation

## ◆ getRefCount()

virtual int32_t fsdk::IRefCounted::getRefCount | ( |  | ) | const
| pure virtual noexcept

Get actual strong reference count.

Returns
  actual reference counter value.

## ◆ getWeakRefCount()

virtual int32_t fsdk::IRefCounted::getWeakRefCount | ( |  | ) | const
| pure virtual noexcept

Get actual weak reference count.

Returns
  actual reference counter value.

## ◆ release()

virtual int32_t fsdk::IRefCounted::release | ( |  | ) |
| pure virtual noexcept

Decrease strong reference count.

Returns
  actual reference counter value.

## ◆ releaseWeak()

virtual int32_t fsdk::IRefCounted::releaseWeak | ( |  | ) |
| pure virtual noexcept

Decrease weak reference count.

Returns
  actual reference counter value.

## ◆ retain()

virtual int32_t fsdk::IRefCounted::retain | ( |  | ) |
| pure virtual noexcept

Increase strong reference count.

Returns
  actual reference counter value. If less than 1 is returned, it has failed

## ◆ retainLocked()

virtual int32_t fsdk::IRefCounted::retainLocked | ( |  | ) |
| pure virtual noexcept

Increase strong reference count thread safely.

Returns
  actual reference counter value. If less than 1 is returned, it has failed

## ◆ retainWeak()

virtual int32_t fsdk::IRefCounted::retainWeak | ( |  | ) |
| pure virtual noexcept

Increase weak reference count.

Returns
  actual reference counter value. If less than 1 is returned, it has failed

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

- include/fsdk/IRefCounted.h