FNiagaraSharedObject

Base class for objects in Niagara that are owned by one object but are then passed for reading to other objects, potentially on other threads.

Windows
MacOS
Linux

Inheritance Hierarchy

FNiagaraSharedObject

FNiagaraDataBuffer

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataSet.h

Include

#include "NiagaraDataSet.h"

Syntax

class FNiagaraSharedObject

Remarks

Base class for objects in Niagara that are owned by one object but are then passed for reading to other objects, potentially on other threads. This class allows us to know if the object is being used so we do not overwrite it and to ensure it's lifetime so we do not access freed data.

Variables

Name Description

Protected variable

TAtomic< int32 ...

 

ReadRefCount

Count of other object currently reading this data.

Constructors

Name Description

Public function

FNiagaraSharedObject()

Destructors

Name Description

Protected function Virtual

~FNiagaraSharedObject()

Functions

Name Description

Public function

void

 

AddReadRef()

Public function

void

 

Destroy()

The owner of this object is now done with it but it may still be in use by others, possibly on other threads.

Public function Static

void

 

FlushDeletionList()

Public function Const

bool

 

IsBeingRead()

Public function Const

bool

 

IsBeingWritten()

Public function Const

bool

 

IsInUse()

Public function

void

 

ReleaseReadRef()

Public function

bool

 

TryLock()

Public function

void

 

Unlock()

Constants

Name

Description

CritSec

DeferredDeletionList

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss