Abstract
Abstract base class for implementing the disposable pattern. Manages a collection of child disposables and ensures proper cleanup.
class MyCustomEditor extends Disposable { constructor() { super(); // Register disposables that should be cleaned up this._register(vscode.workspace.onDidChangeConfiguration(() => { // Handle config change })); }} Copy
class MyCustomEditor extends Disposable { constructor() { super(); // Register disposables that should be cleaned up this._register(vscode.workspace.onDidChangeConfiguration(() => { // Handle config change })); }}
Protected
Collection of child disposables to clean up
Private
Whether this instance has been disposed
Gets whether this instance has been disposed.
True if disposed, false otherwise
Registers a disposable to be cleaned up when this instance is disposed.
The disposable to register
The registered disposable
Disposes of this instance and all registered disposables.
Abstract base class for implementing the disposable pattern. Manages a collection of child disposables and ensures proper cleanup.
Example