* Dispose of all registered disposables and mark this object as disposed. * * Any future disposables added to this object will be disposed of on `add`.
()
| 99 | * Any future disposables added to this object will be disposed of on `add`. |
| 100 | */ |
| 101 | public dispose(): void { |
| 102 | if (this._isDisposed) { |
| 103 | return; |
| 104 | } |
| 105 | |
| 106 | this._isDisposed = true; |
| 107 | this.clear(); |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * @return `true` if this object has been disposed of. |