Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dispose() {
if (this.isDisposed) {
return;
}
this._isDisposed = true;
// If a query hasn't been executed yet, no need to call endSearch
if (this._displayState.query) {
void this._activeProvider.endSearch();
}
this._searchWidget.dispose();
this._disposed.emit(undefined);
Signal.clearData(this);
}
dispose(): void {
// Do nothing if the tracker is already disposed.
if (this._counter < 0) {
return;
}
// Mark the tracker as disposed.
this._counter = -1;
// Clear the connections for the tracker.
Signal.clearData(this);
// Remove all event listeners.
each(this._widgets, w => {
w.node.removeEventListener('focus', this, true);
w.node.removeEventListener('blur', this, true);
});
// Clear the internal data structures.
this._activeWidget = null;
this._currentWidget = null;
this._nodes.clear();
this._numbers.clear();
this._widgets.length = 0;
}
dispose(): void {
if (this.isDisposed) {
return;
}
this._isDisposed = true;
// Clear any listeners for our signals.
Signal.clearData(this);
// Close all the widgets for our contexts and dispose the widget manager.
this._contexts.forEach(context => {
return this._widgetManager.closeWidgets(context);
});
this._widgetManager.dispose();
// Clear the context list.
this._contexts.length = 0;
}
dispose(): void {
if (this.isDisposed) {
return;
}
this._state = {
...Private.DISPOSED_STATE,
timestamp: new Date().getTime()
};
this._tick.promise.catch(_ => undefined);
this._tick.reject(new Error(`Poll (${this.name}) is disposed.`));
this._disposed.emit(undefined);
Signal.clearData(this);
}
dispose(): void {
if (this.isDisposed) {
return;
}
this._disposed.emit(undefined);
Signal.clearData(this);
}
dispose(): void {
if (this.isDisposed) {
return;
}
this._isDisposed = true;
this._kernel.dispose();
this._statusChanged.emit('dead');
this._terminated.emit(void 0);
Private.removeRunning(this);
Signal.clearData(this);
}
dispose(): void {
if (this.isDisposed) {
return;
}
this._state = {
...Private.DISPOSED_STATE,
timestamp: new Date().getTime()
};
this._tick.promise.catch(_ => undefined);
this._tick.reject(new Error(`Poll (${this.name}) is disposed.`));
this._disposed.emit();
Signal.clearData(this);
}
dispose() {
if (this.isDisposed) {
return;
}
this._isDisposed = true;
this._loggers.forEach(x => x.dispose());
Signal.clearData(this);
}
dispose(): void {
if (this._isDisposed) {
return;
}
this._isDisposed = true;
Signal.clearData(this);
this.clear();
}
dispose(): void {
if (this._isDisposed) {
return;
}
this._isDisposed = true;
Signal.clearData(this);
this._value = null;
}