Clear references to scrollbar components

This commit is contained in:
Antonio Scandurra
2015-10-07 16:04:16 +02:00
parent a62341b548
commit 1df9162389
2 changed files with 11 additions and 0 deletions

View File

@@ -12,6 +12,9 @@ class ScrollbarComponent
@domNode.addEventListener 'scroll', @onScrollCallback
destroy: ->
@onScroll = null
getDomNode: ->
@domNode

View File

@@ -119,6 +119,14 @@ class TextEditorComponent
@gutterContainerComponent?.destroy()
@domElementPool.clear()
@verticalScrollbarComponent.destroy()
@horizontalScrollbarComponent.destroy()
@verticalScrollbarComponent = null
@horizontalScrollbarComponent = null
@onVerticalScroll = null
@onHorizontalScroll = null
getDomNode: ->
@domNode