Table of Contents

Class ReferenceBase

Namespace
Stride.Core
Assembly
Stride.Core.dll

Base class for a IReferencable class.

public abstract class ReferenceBase : IReferencable
Inheritance
ReferenceBase
Implements
Derived
Extension Methods

Properties

ReferenceCount

Gets the reference count of this instance.

public int ReferenceCount { get; }

Property Value

int

The reference count.

Methods

AddReference()

Increments the reference count of this instance.

public virtual int AddReference()

Returns

int

The method returns the new reference count.

Destroy()

Releases unmanaged and - optionally - managed resources

protected abstract void Destroy()

Release()

Decrements the reference count of this instance.

public virtual int Release()

Returns

int

The method returns the new reference count.

Remarks

When the reference count is going to 0, the component should release/dispose dependents objects.