A component that manages a set of Disposable objects. When this component is removed from its owner, all managed Disposables are disposed.

Constructor

Methods

View source

add (disposable :Disposable) :Disposer

Add a Disposable, so that it also gets disposed when this component does.

Returns:

This instance, for chaining.

View source

connect0 (signal :Signal0, listener :Listener0) :Disposer

Chainable convenience method for connecting a signal listener and adding its SignalConnection to this disposer.

Returns:

This instance, for chaining.

View source

connect1<A> (signal :Signal1<A>, listener :Listener1<A>) :Disposer

Chainable convenience method for connecting a signal listener and adding its SignalConnection to this disposer.

Returns:

This instance, for chaining.

View source

connect2<A, B> (signal :Signal2<A, B>, listener :Listener2<A, B>) :Disposer

Chainable convenience method for connecting a signal listener and adding its SignalConnection to this disposer.

Returns:

This instance, for chaining.

View source

remove (disposable :Disposable) :Bool

Remove a Disposable from this disposer.

Returns:

True if the disposable was removed.

Static properties

View source

static read only NAME :String