Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Fix JS memory leak #26

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions private/scripts/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ window.addEvent('load', function() {
const categoryList = $('categoryFilterList');
if (!categoryList)
return;
categoryList.empty();
categoryList.getChildren().each(c => c.destroy());

const create_link = function(hash, text, count) {
let display_name = text;
Expand Down Expand Up @@ -526,8 +526,7 @@ window.addEvent('load', function() {
if (tagFilterList === null)
return;

while (tagFilterList.firstChild !== null)
tagFilterList.removeChild(tagFilterList.firstChild);
tagFilterList.getChildren().each(c => c.destroy());

const createLink = function(hash, text, count) {
//Change Area
Expand Down Expand Up @@ -581,8 +580,7 @@ window.addEvent('load', function() {
if (trackerFilterList === null)
return;

while (trackerFilterList.firstChild !== null)
trackerFilterList.removeChild(trackerFilterList.firstChild);
trackerFilterList.getChildren().each(c => c.destroy());

const createLink = function(hash, text, count) {
/* Change Area */
Expand Down
10 changes: 4 additions & 6 deletions private/scripts/dynamicTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,7 @@ LogMessageTable: LogMessageTable,
let rowPos = rows.length;

while ((rowPos < trs.length) && (trs.length > 0)) {
trs[trs.length - 1].dispose();
trs.pop();
trs.pop().destroy();
}
},

Expand All @@ -839,7 +838,7 @@ LogMessageTable: LogMessageTable,
this.selectedRows.erase(rowId);
const tr = this.getTrByRowId(rowId);
if (tr !== null) {
tr.dispose();
tr.destroy();
this.rows.erase(rowId);
return true;
}
Expand All @@ -851,8 +850,7 @@ LogMessageTable: LogMessageTable,
this.rows.empty();
const trs = this.tableBody.getElements('tr');
while (trs.length > 0) {
trs[trs.length - 1].dispose();
trs.pop();
trs.pop().destroy();
}
},

Expand Down Expand Up @@ -1585,7 +1583,7 @@ else {

if (!country_code) {
if (td.getChildren('img').length > 0)
td.getChildren('img')[0].dispose();
td.getChildren('img')[0].destroy();
return;
}

Expand Down