Class NativeFinalizationRegistry

All Implemented Interfaces:
Serializable, ConstProperties<Scriptable>, DebuggableObject, PropHolder<Scriptable>, Scriptable, SymbolScriptable

public class NativeFinalizationRegistry extends ScriptableObject
Implementation of ECMAScript 2021 FinalizationRegistry.

Allows registering cleanup callbacks that are invoked when registered objects are garbage collected. Uses PhantomReference for GC detection, which is available on all platforms including Android.

See Also:
  • Method Details