IReferencable Interface
Namespace: Stride.CoreAssembly: Stride.Core.dll
Base interface for all referencable objects.
public interface IReferencable
              | Name | Description | |
|---|---|---|
| Properties | ||
| ReferenceCount | Gets the reference count of this instance.  | 
                          |
| Methods | ||
| AddReference() | Increments the reference count of this instance.  | 
                          |
| Release() | Decrements the reference count of this instance.  | 
                          |
Properties
ReferenceCount
Gets the reference count of this instance.
int ReferenceCount { get; }
              Property Value
| Type | Description | 
|---|---|
| System.Int32 | The reference count.  | 
                  
Methods
AddReference()
Increments the reference count of this instance.
int AddReference()
              Returns
| Type | Description | 
|---|---|
| System.Int32 | The method returns the new reference count.  | 
                  
Release()
Decrements the reference count of this instance.
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.