Table of Contents

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

value T*

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

other DisposablePtr<T>

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

left DisposablePtr<T>
right DisposablePtr<T>

Returns

bool

operator !=(DisposablePtr<T>, DisposablePtr<T>)

public static bool operator !=(DisposablePtr<T> left, DisposablePtr<T> right)

Parameters

left DisposablePtr<T>
right DisposablePtr<T>

Returns

bool