Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MCore::MemoryObject Class Reference

#include <MemoryObject.h>

Inherited by EMotionFX::BaseObject.

Public Member Functions

 MemoryObject ()
 
virtual ~MemoryObject ()
 
void IncreaseReferenceCount ()
 
void DecreaseReferenceCount ()
 
void Destroy ()
 
uint32 GetReferenceCount () const
 

Protected Member Functions

virtual void Delete ()
 

Detailed Description

The reference counter class.

Constructor & Destructor Documentation

◆ MemoryObject()

MCore::MemoryObject::MemoryObject ( )

The constructor. Sets the initial reference count to 1.

◆ ~MemoryObject()

virtual MCore::MemoryObject::~MemoryObject ( )
virtual

The destructor.

Member Function Documentation

◆ DecreaseReferenceCount()

void MCore::MemoryObject::DecreaseReferenceCount ( )

Decrease the reference count. The Destroy method already calls this.

◆ Delete()

virtual void MCore::MemoryObject::Delete ( )
protectedvirtual

Reimplemented in EMotionFX::BaseObject.

◆ Destroy()

void MCore::MemoryObject::Destroy ( )

Destroy the object, like you would delete it. This internally decreases the reference count. It will only really delete once the reference count reaches zero.

◆ GetReferenceCount()

uint32 MCore::MemoryObject::GetReferenceCount ( ) const

Get the current reference count on this object.

Returns
The reference count, which indicates how many objects reference this one.

◆ IncreaseReferenceCount()

void MCore::MemoryObject::IncreaseReferenceCount ( )

Increase the reference count by one.


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