Commit 0593bde
committed
Fix memory leak in bar chart, part 2.
Chrome helpfully disables requestAnimationFrame in background tabs. It also
slows setInterval rates. However, it does not stop setIntervals completely;
therefore, this example in a background tab would continuously schedule
transitions that never wake up. Flushing the timer queue explicitly guarantees that scheduled transitions have a chance to end when in the background.1 parent 04eae18 commit 0593bde
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
0 commit comments