@@ -195,10 +195,10 @@ abstract class Finalizer<T> {
195
195
/// for registrations which have been detached since they were attached.
196
196
void attach(Object value, T token, {Object? detachKey});
197
197
198
- /// Detaches the finalizer from any objects that used [detachKey] when
199
- /// attaching the finalizer to them.
198
+ /// Detaches this finalizer from any objects that used the identical [detachKey] when
199
+ /// attaching this finalizer to them.
200
200
///
201
- /// If the finalizer was attached multiple times to the same object with different
201
+ /// If this finalizer was attached multiple times to the same object with different
202
202
/// detachment keys, only those attachments which used [detachKey] are
203
203
/// removed.
204
204
///
@@ -248,8 +248,8 @@ abstract class Finalizable {
248
248
factory Finalizable._() => throw UnsupportedError("");
249
249
}
250
250
251
- typedef NativeFinalizer = Void Function(Pointer<Void>);
252
- typedef NativeFinalizerPtr = Pointer<NativeFunction<NativeFinalizer>>
251
+ typedef NativeFinalizerSignature = Void Function(Pointer<Void> token );
252
+ typedef NativeFinalizerPtr = Pointer<NativeFunction<NativeFinalizerSignature>>;
253
253
254
254
/// A native finalizer which can be attached to Dart objects.
255
255
///
@@ -301,14 +301,15 @@ abstract class NativeFinalizer {
301
301
/// [externalSize] is an amount of native (non-Dart) memory owned by the
302
302
/// given [value]. This information is used to drive garbage collection
303
303
/// scheduling heuristics.
304
- void attach(Finalizable value, Pointer<Void> token, {Object? detachKey, int externalSize}});
304
+ void attach(Finalizable value, Pointer<Void> token,
305
+ {Object? detachKey, int externalSize});
305
306
306
- /// Detaches the finalizer from any objects that used [detachKey] when
307
- /// attaching the finalizer to them.
307
+ /// Detaches this finalizer from any objects that used the identical
308
+ /// [detachKey] when attaching this finalizer to them.
308
309
///
309
- /// If the finalizer was attached multiple times to the same object with different
310
- /// detachment keys, only those attachments which used [detachKey] are
311
- /// removed.
310
+ /// If this finalizer was attached multiple times to the same object with
311
+ /// different detachment keys, only those attachments which used [detachKey]
312
+ /// are removed.
312
313
///
313
314
/// After detaching, an attachment won't cause any callbacks to happen if the
314
315
/// object become inaccessible.
0 commit comments