Subscription
Represents a disposable resource, such as the execution of an Observable. A
Subscription has one important method, unsubscribe
, that takes no argument
and just disposes the resource held by the subscription.
Subclasses
-
Subscriber
Description
Additionally, subscriptions may be grouped together through the add()
method, which will attach a child Subscription to the current Subscription.
When a Subscription is unsubscribed, all its children (and its grandchildren)
will be unsubscribed as well.
Static Properties
Property | Type | Description |
---|---|---|
EMPTY |
Constructor
Parameters
|
Properties
Property | Type | Description |
---|---|---|
closed |
A flag to indicate whether this Subscription has already been unsubscribed. |
Methods
unsubscribe() |
---|
Disposes the resources held by the subscription. May, for instance, cancel an ongoing Observable execution or cancel any other type of work that started when the Subscription was created. |
ParametersThere are no parameters. Returns
|
remove() | ||
---|---|---|
Removes a Subscription from the internal list of subscriptions that will unsubscribe during the unsubscribe process of this Subscription. |
||
Parameters
Returns
|