Skip to content

πŸ“ˆ Get real-time stocks from TradingView

Remove memory leak

Grigoryf5cd4f0df6a5
diff --git a/src/chart/session.js b/src/chart/session.js
index 49d56a2..d2e0ab2 100644
--- a/src/chart/session.js
+++ b/src/chart/session.js
@@ -545,6 +545,7 @@ module.exports = (client) => class ChartSession {
if (this.#replayMode) this.#client.send('replay_delete_session', [this.#replaySessionID]);
this.#client.send('chart_delete_session', [this.#chartSessionID]);
delete this.#client.sessions[this.#chartSessionID];
+ delete this.#client.sessions[this.#replaySessionID];
this.#replayMode = false;
}
};