NativeFinalizer constructor Null safety
Creates a finalizer with the given finalization callback.
callback must be a native function which can be executed outside of
a Dart isolate. This means that passing an FFI trampoline (a function
pointer obtained via Pointer.fromFunction) is not supported.
callback might be invoked on an arbitrary thread and not necessary
on the same thread that created NativeFinalizer.
// TODO(https://dartbug.com/47778): Implement isolate independent code and // update the above comment. external factory NativeFinalizer(Pointer<NativeFinalizerFunction> callback);