mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-12 20:06:13 +00:00
Tear down Ace session when aceEditor is destroyed
This cleans up the Ace worker that parses syntax, preventing a memory leak
This commit is contained in:
parent
5e39e61c9b
commit
85ceab5310
1 changed files with 2 additions and 0 deletions
|
@ -430,6 +430,8 @@ define [
|
|||
scope.$on '$destroy', () ->
|
||||
if scope.sharejsDoc?
|
||||
detachFromAce(scope.sharejsDoc)
|
||||
session = editor.getSession()
|
||||
session?.destroy()
|
||||
|
||||
scope.$emit "#{scope.name}:inited", editor
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue