removeNodeExplicit method

Future<void> removeNodeExplicit(
  1. Node n
)

Implementation

Future<void> removeNodeExplicit(Node n) =>
    _lockFor(n.runtimeType, tag: n.$tag).synchronized(() async {
      PrecisionStopwatch p = PrecisionStopwatch.start();
      nodes.removeWhere((i) => identical(i, n));
      for (VariableMirror f in n.$dependencyFields()) {
        reflect(n).getField(f.simpleName).setField(
            #$referenceCount,
            (reflect(n)
                    .getField(f.simpleName)
                    .getField(#$referenceCount)
                    .reflectee as int) -
                1);
      }

      for (Future<void> Function(Node, NodeStorage, PrecisionStopwatch) f
          in onStopPipeline) {
        await f(n, storage, p);
      }
    }).then((_) => gc());