dispose method

  1. @override
void dispose()
override

Disposes this disposable and any resources it has open.

Implementation

@override
void dispose() {
  if (_subscription != null) {
    _subscription!.cancel();
    _subscription = null;
  }
  if (_target != null) {
    for (int i = 0; i < length; i++) {
      T? object = _target![i];
      if (object == null) continue;
      disposeMapped(object);
    }
    _target = null;
  }
}