Google is committed to advancing racial equity for Black communities. See how.

close method

  • @override

void close () override

Close this node and all of its bindings and children.

Implementation

@override
void close() {
  _isClosed = true;
  for (var entry in _entries.entries) {
    entry.value.node.close();
  }
  removeAllNodes();
  // schedule a task because if user closes this as soon as
  // they open a connection, dart fidl binding throws exception due to
  // event(OnOpen) on this fidl.
  scheduleMicrotask(() {
    for (var c in _connections) {
      c.closeBinding();
    }
    _connections.clear();
  });
}