detach method

void detach()

Mark this PipelineOwner as detached.

Typically, this is only called directly on the root PipelineOwner. Children are automatically detached from their parent's PipelineManifold when dropChild is called.

Implementation

void detach() {
  assert(_manifold != null);
  _manifold!.removeListener(_updateSemanticsOwner);
  _manifold = null;
  // Not updating the semantics owner here to not disrupt any of its clients
  // in case we get re-attached. If necessary, semantics owner will be updated
  // in "attach", or disposed in "dispose", if not reattached.

  for (final PipelineOwner child in _children) {
    child.detach();
  }
}