FinalizationRegistry

constructor(cleanupCallback: (heldValue: T) -> Unit)(source)

Creates a finalization registry with an associated cleanup callback

Parameters

cleanupCallback

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