Table of Contents

Class ScopedGCHandle

Namespace
OpenCvSharp.Internal.Util
Assembly
OpenCvSharp.dll

Original GCHandle that implement IDisposable

public sealed class ScopedGCHandle : IDisposable
Inheritance
ScopedGCHandle
Implements
Inherited Members

Constructors

ScopedGCHandle(object)

Constructor

public ScopedGCHandle(object value)

Parameters

value object

ScopedGCHandle(object, GCHandleType)

Constructor

public ScopedGCHandle(object value, GCHandleType type)

Parameters

value object
type GCHandleType

Properties

Handle

public GCHandle Handle { get; }

Property Value

GCHandle

IsAllocated

public bool IsAllocated { get; }

Property Value

bool

Target

public object? Target { get; }

Property Value

object

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Free()

public void Free()

FromIntPtr(nint)

public static ScopedGCHandle FromIntPtr(nint value)

Parameters

value nint

Returns

ScopedGCHandle

ToIntPtr(ScopedGCHandle)

public static nint ToIntPtr(ScopedGCHandle value)

Parameters

value ScopedGCHandle

Returns

nint

ToString()

Returns a string that represents the current object.

public override string? ToString()

Returns

string

A string that represents the current object.