New issue
Advanced search Search tips

Issue 781738 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Nov 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

setInterval memory leak

Reported by vidar.e....@gmail.com, Nov 6 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.30 Safari/537.36

Steps to reproduce the problem:
1. Use setInterval to change the content of an HTML element every second.
2. 
3. 

What is the expected behavior?
Regular garbage collection.

What went wrong?
No garbage collection occurs, at all. Both heap size and node count increases incessantly.

https://stackoverflow.com/questions/47077887/setinterval-memory-leak

Did this work before? No 

Chrome version: 63.0.3239.30  Channel: beta
OS Version: 10.0
Flash Version: 

I'm trying to create a simple javascript clock. Our clients use our single page app for several days without refreshing the page, so this is a real resource hog for us that eventually crashes the tab.
 
Labels: Needs-Triage-M63
Please provide a sample testcase for reproducing the bug.
I am not sure how? Do I just post the code in this comment? The link contains the testcase.

JavaScript: 
updateClock = function() {
  document.getElementById('myDateTime').textContent = new Date();
}

setInterval(updateClock, 1000);

HTML:
<div id="myDateTime"></div>

Comment 3 by e...@chromium.org, Nov 7 2017

Components: -Blink Blink>MemoryAllocator>GarbageCollection
I have an demo page (meant to show the catch-up effect of setInterval()) which probably can be used to demonstrate this issue: https://bl.ocks.org/Herst/f40207373c9f983cfba2e79442b51129

Select "setInterval" in the select box for the counter to start.
Cc: kkaluri@chromium.org
Labels: TE-NeedsTriageHelp
Unable to triage this issue from TE-End, hence adding TE-NeedsTriageHelp label for further triage from dev team
Project Member

Comment 6 by sheriffbot@chromium.org, Nov 13

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment