Class DisposeObject
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
Base class to handle disposable.
public abstract class DisposeObject : IDisposable
- Inheritance
-
DisposeObject
- Implements
- Derived
- Inherited Members
Properties
IsDisposed
Gets a value indicating whether this instance is disposed.
public bool IsDisposed { get; }
Property Value
- bool
trueif this instance is disposed; otherwise,false.
RefCount
public int RefCount { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
[SuppressMessage("Microsoft.Design", "CA1063:ImplementIDisposableCorrectly", Justification = "False positive.")]
public void Dispose()
ForceDispose()
Forces the dispose.
public void ForceDispose()
IncRef()
Increase reference counter
public int IncRef()
Returns
OnDispose(bool)
Disposes of object resources.
protected virtual void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
RemoveAndDispose<T>(T)
Dispose a disposable object. Removes this object from this instance..
public static void RemoveAndDispose<T>(T objectToDispose) where T : class, IDisposable
Parameters
objectToDisposeTThe object to dispose.
Type Parameters
T
RemoveAndDispose<T>(ref T?)
Dispose a disposable object and set the reference to null. Removes this object from this instance..
public static void RemoveAndDispose<T>(ref T? objectToDispose) where T : class, IDisposable
Parameters
objectToDisposeTObject to dispose.
Type Parameters
T
Set<T>(ref T, T)
protected static bool Set<T>(ref T backingField, T value)
Parameters
backingFieldTvalueT
Returns
Type Parameters
T