Destroy TextEditorPresenter when unmounting TextEditorComponent

Fixes atom/find-and-replace#348
This commit is contained in:
Nathan Sobo
2015-02-11 09:02:33 -07:00
parent 98e126b40d
commit 009d945e1e

View File

@@ -149,6 +149,7 @@ TextEditorComponent = React.createClass
{editor, hostElement} = @props
@unsubscribe()
@presenter.destroy()
@scopedConfigSubscriptions.dispose()
window.removeEventListener 'resize', @requestHeightAndWidthMeasurement
clearInterval(@domPollingIntervalId)