Skip to content

ClassHandle

Core and matricestypeOpenCV 5.0.0
import type { ClassHandle } from '@banou/opencv-wasm'

An owned handle to an object in this OpenCV instance. Use using or delete() to release native resources.

export interface ClassHandle {
  readonly [nativeType]: { ClassHandle: true };
  [Symbol.dispose](): void;
  isAliasOf(other: ClassHandle): boolean;
  delete(): void;
  deleteLater(): this;
  isDeleted(): boolean;
  clone(): this;
}

Constructors and members

[Symbol.dispose]

Release this native handle at the end of a using scope.

[Symbol.dispose](): void;

isAliasOf

Return whether another handle refers to the same underlying native object.

isAliasOf(other: ClassHandle): boolean;
other

other argument (ClassHandle).

Returns

The boolean result.

delete

Release this handle and its native reference. Accessing it afterwards is invalid. Use isDeleted() to avoid deleting it twice.

delete(): void;

deleteLater

Schedule this handle for deferred native disposal through Emscripten.

deleteLater(): this;
Returns

The this result.

isDeleted

Return whether this native handle has already been released.

isDeleted(): boolean;
Returns

The boolean result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.