ReferenceBase Class
Namespace: Stride.CoreAssembly: Stride.Core.dll
Base class for a IReferencable class.
System.Object →
ReferenceBase
Derived from ReferenceBase: Blob
public abstract class ReferenceBase : IReferencable
Name | Description | |
---|---|---|
Properties | ||
ReferenceCount | Gets the reference count of this instance. |
|
Methods | ||
AddReference() | Increments the reference count of this instance. |
|
Destroy() | Releases unmanaged and - optionally - managed resources |
|
Release() | Decrements the reference count of this instance. |
Properties
ReferenceCount
Gets the reference count of this instance.
public int ReferenceCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The reference count. |
Methods
AddReference()
Increments the reference count of this instance.
public virtual int AddReference()
Returns
Type | Description |
---|---|
System.Int32 | 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
Type | Description |
---|---|
System.Int32 | The method returns the new reference count. |
Remarks
When the reference count is going to 0, the component should release/dispose dependents objects.