aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-11-24 16:05:05 +0100
committerStas Vilchik <vilchiks@gmail.com>2014-11-24 16:05:05 +0100
commit73ce704c2b111dcdd622f14be162f93bc1909ab5 (patch)
tree01d6301ade9645ea5bbba106d01725db21e5d662 /server
parentde36552d0dd8fb43e52e4508359fc45c631279fb (diff)
downloadsonarqube-73ce704c2b111dcdd622f14be162f93bc1909ab5.tar.gz
sonarqube-73ce704c2b111dcdd622f14be162f93bc1909ab5.zip
SONAR-5718 Fix memory leak
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee
index e106896b9e9..3fd1d00010e 100644
--- a/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee
+++ b/server/sonar-web/src/main/coffee/issues/component-viewer/main.coffee
@@ -42,6 +42,7 @@ define [
formattedSource: []
@component = new Backbone.Model()
@issues = new Issues()
+ @issueViews = []
@listenTo options.app.state, 'change:selectedIndex', @select
@loadSourceBeforeThrottled = _.throttle @loadSourceBefore, 1000
@loadSourceAfterThrottled = _.throttle @loadSourceAfter, 1000
@@ -144,6 +145,8 @@ define [
onClose: ->
+ @issueViews.forEach (view) -> view.close()
+ @issuesView = []
@unbindScrollEvents()
@unbindShortcuts()
@@ -171,6 +174,7 @@ define [
line = issue.get('line') || 0
row = @$("[data-line-number=#{line}]")
issueView = new IssueView app: @options.app, model: issue
+ @issueViews.push issueView
if line == 0
issueView.render().$el.insertBefore @$('.issues-workspace-component-viewer-code')
else