Packages > @fluidframework/core-interfaces > IDisposable
IDisposable Interface
Base interface for objects that require lifetime management via explicit disposal.
Signature
export interface IDisposable
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
disposed |
readonly
|
boolean | Whether or not the object has been disposed. If true, the object should be considered invalid, and its other state should be disregarded. |
Methods
Method | Return Type | Description |
---|---|---|
dispose(error) | void | Dispose of the object and its resources. |
Property Details
disposed
Whether or not the object has been disposed. If true, the object should be considered invalid, and its other state should be disregarded.
Signature
readonly disposed: boolean;
Method Details
dispose
Dispose of the object and its resources.
Signature
dispose(error?: Error): void;
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
error | optional | Error | Optional error indicating the reason for the disposal, if the object was disposed as the result of an error. |