attachFinalizer method
- @protected
- NativeFinalizer finalizer,
- Pointer<
Void> token, { - int? externalSize,
Attaches this Dart object to the native pointer so that finalizer
calls freeFunc on _ptr when this object is GC'd.
Implementation
@protected
void attachFinalizer(NativeFinalizer finalizer, Pointer<Void> token, {int? externalSize}) {
finalizer.attach(this, token, detach: this, externalSize: externalSize);
}