Rx.Disposable
Last updated
Was this helpful?
Last updated
Was this helpful?
Provides a set of static methods for creating Disposables, which defines a method to release allocated resources.
The follow example shows the basic usage of an Rx.Disposable
.
rx.js
Disposable Class Methods
##Disposable Class Properties
##Disposable Instance Methods
##Rx.Disposable.create(action)
Creates a disposable object that invokes the specified action when disposed.
action
(Function): Function to run during the first call to dispose
. The action is guaranteed to be run at most once.
(Disposable): The disposable object that runs the given action upon disposal.
rx.js
Rx.Disposable.empty
Gets the disposable that does nothing when disposed.
(Disposable): The disposable that does nothing when disposed.
rx.js
Rx.Disposable.prototype.dispose()
Performs the task of cleaning up resources.
rx.js