FinalizationRegistry

open class FinalizationRegistry<T : ERROR CLASS: Symbol not found for JsAny??>(cleanupCallback: (heldValue: T) -> Unit)(source)

MDN Reference

Parameters

cleanupCallback

The callback to call after an object in the registry has been reclaimed.

Constructors

Link copied to clipboard
constructor(cleanupCallback: (heldValue: T) -> Unit)

Creates a finalization registry with an associated cleanup callback

Functions

Link copied to clipboard
fun register(target: ERROR CLASS: Symbol not found for JsAny, heldValue: T, unregisterToken: ERROR CLASS: Symbol not found for JsAny = definedExternally)

Registers an object with the registry.

Link copied to clipboard
fun unregister(unregisterToken: ERROR CLASS: Symbol not found for JsAny)

Unregisters an object from the registry.