SerialDisposable

public final class SerialDisposable : Disposable

A disposable that disposes of its wrapped disposable, and allows its wrapped disposable to be replaced.

  • Declaration

    Swift

    public var isDisposed: Bool { get }
  • The current inner disposable to dispose of.

    Whenever this property is set (even to the same value!), the previous disposable is automatically disposed.

    Declaration

    Swift

    public var inner: Disposable? { get set }
  • Initializes the receiver to dispose of the argument when the SerialDisposable is disposed.

    Declaration

    Swift

    public init(_ disposable: Disposable? = nil)

    Parameters

    disposable

    Optional disposable.

  • Declaration

    Swift

    public func dispose()