     @closest('.panes').view()
 
   beforeRemove: ->
+    @disposables.dispose()
     @model.destroy() unless @model.isDestroyed()
 
   remove: (selector, keepData) ->

{$, View} = require './space-pen-extensions'
Delegator = require 'delegato'
{deprecate} = require 'grim'
PropertyAccessors = require 'property-accessors'

Pane = require './pane'

  previousActiveItem: null

  initialize: (args...) ->
    @disposables = new CompositeDisposable

    if args[0] instanceof Pane
      @model = args[0]
    else
