close method

void close()

Closes the subscriptions for this Rx, releasing the resources.

Implementation

void close() {
  _subscriptions.forEach((getStream, _subscriptions) {
    for (final subscription in _subscriptions) {
      subscription.cancel();
    }
  });

  _subscriptions.clear();
  subject.close();
}