From d6072bc9e07f441c661678c50152160c7235dffd Mon Sep 17 00:00:00 2001 From: Nick Strayer Date: Thu, 12 Dec 2024 15:45:07 -0500 Subject: [PATCH] Fix problem where we prematurely dispose the variables instance causing wonky data explorer problems. --- .../positronVariables/common/positronVariablesService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts b/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts index 61c5e4e7dae..41aa41dc781 100644 --- a/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts +++ b/src/vs/workbench/services/positronVariables/common/positronVariablesService.ts @@ -300,9 +300,9 @@ export class PositronVariablesService extends Disposable implements IPositronVar }); if (existingInstance) { - // Clean up the old session ID mapping - this._positronVariablesInstancesBySessionId.deleteAndDispose(existingInstance.session.sessionId); - + // Clean up the old session ID mapping. Don't dispose of the instance because it's + // managed by other parts of the system. + this._positronVariablesInstancesBySessionId.deleteAndLeak(existingInstance.session.sessionId); // Update the map of Positron variables instances by session ID. this._positronVariablesInstancesBySessionId.set( session.sessionId,