mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:23:10 +00:00
Fix memory leak setting up spell check
Switching docs would set up event listeners on Ace without tearing down any old listeners, which could lead to a memory leak. This tears down old listeners when detaching from the "old" doc
This commit is contained in:
parent
158cb58e29
commit
2dc509f43d
1 changed files with 1 additions and 0 deletions
|
@ -468,6 +468,7 @@ define [
|
|||
editor.focus()
|
||||
|
||||
detachFromAce = (sharejs_doc) ->
|
||||
tearDownSpellCheck()
|
||||
sharejs_doc.detachFromAce()
|
||||
sharejs_doc.off "remoteop.recordRemote"
|
||||
|
||||
|
|
Loading…
Reference in a new issue