Skip to content

Commit

Permalink
Fix problem where we prematurely dispose the variables instance causi…
Browse files Browse the repository at this point in the history
…ng wonky data explorer problems.
  • Loading branch information
nstrayer committed Dec 12, 2024
1 parent 34b0a28 commit d6072bc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d6072bc

Please sign in to comment.