Packages > @fluidframework/tree > IDisposable

IDisposable Interface

An object with an explicit lifetime that can be ended.

Signature

export interface IDisposable

Methods

Method Return Type Description
[disposeSymbol]() void

Call to end the lifetime of this object.

It is invalid to use this object after this, except for operations which explicitly document they are valid after disposal.

Method Details

[disposeSymbol]

Call to end the lifetime of this object.

It is invalid to use this object after this, except for operations which explicitly document they are valid after disposal.

Signature

[disposeSymbol](): void;

Remarks

May cleanup resources retained by this object. Often includes un-registering from events and thus preventing other objects from retaining a reference to this indefinably.

Usually the only operations allowed after disposal are querying if an object is already disposed, but this can vary between implementations.