File tree 1 file changed +5
-2
lines changed
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 {
19
19
#socket: WebSocket
20
20
#messageCount = 0
21
21
#workspaceId: string
22
+ #memoryInterval: NodeJS . Timeout
22
23
23
24
constructor ( workspace : Workspace , httpAgent : ProxyAgent , restClient : Api , storage : Storage ) {
24
25
const logger = getMemoryLogger ( )
@@ -96,12 +97,12 @@ export class Inbox implements vscode.Disposable {
96
97
} )
97
98
98
99
// Log memory stats periodically
99
- const memoryInterval = setInterval (
100
+ this . # memoryInterval = setInterval (
100
101
( ) => {
101
102
if ( ! this . #disposed) {
102
103
logger . logMemoryUsage ( "INBOX_PERIODIC" )
103
104
} else {
104
- clearInterval ( memoryInterval )
105
+ clearInterval ( this . # memoryInterval)
105
106
}
106
107
} ,
107
108
5 * 60 * 1000 ,
@@ -118,6 +119,8 @@ export class Inbox implements vscode.Disposable {
118
119
this . #disposed = true
119
120
logger . trackResourceDisposed ( "InboxWebSocket" , this . #workspaceId)
120
121
}
122
+
123
+ clearInterval ( this . #memoryInterval)
121
124
}
122
125
123
126
private notifyError ( error : unknown ) {
You can’t perform that action at this time.
0 commit comments