mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user