Returns true to identify this instance as a Finalizer.
Registers a target object with a held value and optional unregister token.
The object to observe for garbage collection
The value passed to the cleanup callback
OptionalunregisterToken: WeakKey
Optional token to unregister the callback prior to GC
Unregisters a previously registered finalizer callback.
The token used during registration
True if a registration was found and removed
StaticregisterRegisters an object to execute a cleanup callback when garbage collected. Returns a function to cancel the finalizer registration prior to GC.
The target object to observe for garbage collection
The teardown callback to execute upon GC reclamation
OptionalunregisterToken: WeakKey
Optional token used for unregistration (defaults to a unique token object)
A teardown function that cancels the finalization registration without retaining target
Finalizer
Wrapper around FinalizationRegistry providing typed, safe resource cleanup callbacks triggered when objects are reclaimed by the Garbage Collector.