docs/Classes/SerialDisposable.html
public final class SerialDisposable : DisposeBase, Cancelable
Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource.
`
isDisposed
`
Swift
public var isDisposed: Bool { get }
Was resource disposed.
`
init()
`
Initializes a new instance of the SerialDisposable.
Swift
override public init()
`
disposable
`
Gets or sets the underlying disposable.
Assigning this property disposes the previous disposable object.
If the SerialDisposable has already been disposed, assignment to this property causes immediate disposal of the given disposable object.
Swift
public var disposable: Disposable { get set }
`
dispose()
`
Disposes the underlying disposable as well as all future replacements.
Swift
public func dispose()