       item: @bottomContainer,
       priority: -100
 
+  removeMarkers: ->
+    @markers.forEach (marker) -> try marker.destroy()
+    @markers = []
+
   destroy: ->
+    @removeMarkers()
     @subscriptions.dispose()
     @bottomBar.destroy()
     @panel.destroy()

      messages = @lineMessages
    @panel.updateMessages messages, @state.scope is 'Project'

  updateLineMessages: ->
    @lineMessages =
      if @bottomContainer.getTab('File').attached

    @bottomContainer = new BottomContainer().prepare(@linter.state)
    @bottomBar = null

    @subscriptions.add atom.config.observe('linter.underlineIssues', (underlineIssues) =>
      @underlineIssues = underlineIssues
    )
    @subscriptions.add @linter.onDidClassifyMessages =>
      @render()

