Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Use set and clear debouncer upon completion. Fixes #5250. #5499

Merged
merged 9 commits into from
Feb 28, 2019

Conversation

kevinpschaaf
Copy link
Member

@kevinpschaaf kevinpschaaf commented Feb 27, 2019

Description

The queue used to allow debouncers to be flushable did not have a mechanism to be cleared outside of calling flush().

This change switches the queue to use a Set instead of an Array to allow for O(1) removals, and ensures debouncers are cleared from the queue once they run.

Reference Issue

Fixes #5250

@kevinpschaaf kevinpschaaf changed the title Use set and clear debouncer upon completion. Fixes #5250. [3.x] Use set and clear debouncer upon completion. Fixes #5250. Feb 27, 2019
@kevinpschaaf kevinpschaaf mentioned this pull request Feb 28, 2019
6 tasks
lib/utils/debounce.js Outdated Show resolved Hide resolved
test/unit/debounce.html Show resolved Hide resolved
lib/utils/debounce.js Outdated Show resolved Hide resolved
lib/utils/debounce.js Show resolved Hide resolved
@kevinpschaaf kevinpschaaf merged commit e4ee5f8 into master Feb 28, 2019
@kevinpschaaf kevinpschaaf deleted the 5250-fix-memleak branch February 28, 2019 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants