Struct DisposablePtr<T>
- Namespace
- Misaki.HighPerformance.LowLevel
- Assembly
- Misaki.HighPerformance.LowLevel.dll
public struct DisposablePtr<T> : IDisposable, IEquatable<DisposablePtr<T>> where T : unmanaged, IDisposable
Type Parameters
T
- Implements
- Inherited Members
Constructors
DisposablePtr(T*)
public DisposablePtr(T* value)
Parameters
valueT*
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Equals(DisposablePtr<T>)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(DisposablePtr<T> other)
Parameters
otherDisposablePtr<T>An object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Get()
public readonly T* Get()
Returns
- T*
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
GetRef()
public ref T GetRef()
Returns
- T
Share()
public readonly SharedPtr<T> Share()
Returns
- SharedPtr<T>
Operators
operator ==(DisposablePtr<T>, DisposablePtr<T>)
public static bool operator ==(DisposablePtr<T> left, DisposablePtr<T> right)
Parameters
leftDisposablePtr<T>rightDisposablePtr<T>
Returns
operator !=(DisposablePtr<T>, DisposablePtr<T>)
public static bool operator !=(DisposablePtr<T> left, DisposablePtr<T> right)
Parameters
leftDisposablePtr<T>rightDisposablePtr<T>