Disposable
public protocol Disposable: class
Represents something that can be “disposed”, usually associated with freeing resources or canceling work.
-
Whether this disposable has been disposed already.
Declaration
Swift
var isDisposed: Bool
-
Disposing of the resources represented by
self
. Ifself
has already been disposed of, it does nothing.Note
Implementations must issue a memory barrier.Declaration
Swift
func dispose()