mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
When a pane view is removed in anyway, make sure its model is destroyed
This commit is contained in:
@@ -206,9 +206,11 @@ class Pane extends View
|
||||
getContainer: ->
|
||||
@closest('.panes').view()
|
||||
|
||||
beforeRemove: ->
|
||||
@model.destroy() unless @model.isDestroyed()
|
||||
|
||||
# Private:
|
||||
remove: (selector, keepData) ->
|
||||
return super if keepData
|
||||
@unsubscribe()
|
||||
@model.destroy() unless @model.isDestroyed()
|
||||
super
|
||||
|
||||
Reference in New Issue
Block a user