File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export class Inbox implements vscode.Disposable {
1919 #socket: WebSocket
2020 #messageCount = 0
2121 #workspaceId: string
22+ #memoryInterval: NodeJS . Timeout
2223
2324 constructor ( workspace : Workspace , httpAgent : ProxyAgent , restClient : Api , storage : Storage ) {
2425 const logger = getMemoryLogger ( )
@@ -96,12 +97,12 @@ export class Inbox implements vscode.Disposable {
9697 } )
9798
9899 // Log memory stats periodically
99- const memoryInterval = setInterval (
100+ this . # memoryInterval = setInterval (
100101 ( ) => {
101102 if ( ! this . #disposed) {
102103 logger . logMemoryUsage ( "INBOX_PERIODIC" )
103104 } else {
104- clearInterval ( memoryInterval )
105+ clearInterval ( this . # memoryInterval)
105106 }
106107 } ,
107108 5 * 60 * 1000 ,
@@ -118,6 +119,8 @@ export class Inbox implements vscode.Disposable {
118119 this . #disposed = true
119120 logger . trackResourceDisposed ( "InboxWebSocket" , this . #workspaceId)
120121 }
122+
123+ clearInterval ( this . #memoryInterval)
121124 }
122125
123126 private notifyError ( error : unknown ) {
You can’t perform that action at this time.
0 commit comments