close method

void close()
inherited

Closes the subscriptions for this Rx, releasing the resources.

Implementation

void close() {
  _subscriptions.forEach((observable, subscription) => subscription.cancel());
  _subscriptions.clear();
  subject.close();
}