DisposeBase Class
Namespace: Stride.CoreAssembly: Stride.Core.dll
Base class for a System.IDisposable interface.
System.Object →
DisposeBase
[DataContract]
public abstract class DisposeBase : IDisposable, IReferencable
Name | Description | |
---|---|---|
Properties | ||
IsDisposed | Has the component been disposed or not yet. |
|
Methods | ||
Destroy() | Disposes of object resources. |
|
Dispose() | ||
OnAddReference() | ||
OnReleaseReference() | ||
Explicit Interface Implementations | ||
IReferencable.AddReference() | Increments the reference count of this instance. |
|
IReferencable.ReferenceCount | Gets the reference count of this instance. |
|
IReferencable.Release() | Decrements the reference count of this instance. |
Properties
IsDisposed
Has the component been disposed or not yet.
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Destroy()
Disposes of object resources.
protected virtual void Destroy()
Dispose()
public void Dispose()
OnAddReference()
protected virtual void OnAddReference()
OnReleaseReference()
protected virtual void OnReleaseReference()
Explicit Interface Implementations
IReferencable.AddReference()
Increments the reference count of this instance.
int IReferencable.AddReference()
Returns
Type | Description |
---|---|
System.Int32 | The method returns the new reference count. |
IReferencable.ReferenceCount
Gets the reference count of this instance.
int IReferencable.ReferenceCount { get; }
Returns
Type | Description |
---|---|
System.Int32 | The reference count. |
IReferencable.Release()
Decrements the reference count of this instance.
int IReferencable.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.