diff options
author | Wu Cheng-Han | 2016-07-02 16:12:48 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-07-02 16:12:48 +0800 |
commit | 858b30c20c5ce555ab023d69bad24d548cdcbc4e (patch) | |
tree | b6b107731e42c52c37fcef16a83bbddb56efcef8 | |
parent | a7773be949a0bf74467b197810e18955a92fb2b4 (diff) |
Try to solve potential memory leaks
Diffstat (limited to '')
-rw-r--r-- | lib/realtime.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/realtime.js b/lib/realtime.js index 5de3c565..ad4ae215 100644 --- a/lib/realtime.js +++ b/lib/realtime.js @@ -330,6 +330,8 @@ var disconnectSocketQueue = []; function finishConnection(socket, note, user) { if (!socket || !note || !user) { + if (note) delete note; + if (user) delete user; connectionSocketQueue.pop(); isConnectionBusy = false; return; |