Use default implementation of ::destroy from theorist Model class

Move actions that need to happen on destruction to ::destroyed hook.
This commit is contained in:
Nathan Sobo
2014-07-08 21:29:32 -06:00
parent dd5c9ff6d4
commit 6fe05064eb

View File

@@ -970,7 +970,7 @@ class DisplayBuffer extends Model
for marker in @getMarkers()
marker.notifyObservers(textChanged: false)
destroy: ->
destroyed: ->
marker.unsubscribe() for marker in @getMarkers()
@tokenizedBuffer.destroy()
@unsubscribe()