Skip to content

Commit

Permalink
Attempt to stop leaking memory
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Apr 1, 2021
1 parent a2fd4d0 commit 0faedec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions display.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ function initPage() {
var panel_id = $(this).attr('id').split('_').pop();

reload_panel(panel_id, true, false);
Pace.stop();
});
}

Expand All @@ -654,6 +655,7 @@ function testPoller() {
$('#obal li').each(function() {
var panel_id = $(this).attr('id').split('_').pop();
reload_panel(panel_id, false, false);
Pace.stop();
});
}
});
Expand All @@ -667,6 +669,11 @@ function reload_panel(panel_id, forced_update, refresh) {

$.get(urlPath+'plugins/intropage/intropage.php?action=reload&force='+forced_update+'&panel_id='+panel_id)
.done(function(data) {
if ($('#panel_'+panel_id).find('.chart_wrapper').length) {
chart_id = $('#panel_'+panel_id).find('.chart_wrapper').attr('id');
eval(chart_id).destroy();
}

$('#panel_'+panel_id).find('.panel_data').empty().html(data);

if (!refresh) {
Expand All @@ -692,6 +699,7 @@ function reload_all() {
reload_panel(panel_id, false, true);
});
}
Pace.stop();
}

// detail to the new window
Expand Down

0 comments on commit 0faedec

Please sign in to comment.