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

unbind method

InterfaceHandle<T> unbind ()

Unbinds the proxy and returns the unbound channel as an interface handle.

Calls on the proxy will no longer be encoded as messages on the bound channel.

The proxy must have previously been bound (e.g., using bind).

Implementation

InterfaceHandle<T> unbind() {
  assert(isBound);
  if (!_reader.isBound) {
    return null;
  }

  if (onUnbind != null) {
    onUnbind();
  }

  // TODO(rosswang): Do we need to _reset() here?
  return InterfaceHandle<T>(_reader.unbind());
}