dispose method

void dispose()

Stops all recorders and clears the registry. Idempotent.

Does not dispose the registered cells — the harness does not own them. The caller is responsible for any cell invalidation.

After dispose, add, recordPulses, pump, and emitAndSettle throw StateError; cell, valueCell, and cells return the (now empty) registry without throwing, since they read from it rather than extending it.

See Also:

Implementation

void dispose() {
  if (_disposed) return;
  _disposed = true;
  for (final recorder in _recorders) {
    recorder.stop();
  }
  _recorders.clear();
  _cells.clear();
}