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

fix(devtools): fix memory leak when devtools is not installed #4833

Merged
merged 2 commits into from Nov 2, 2021

Conversation

caozhong1996
Copy link
Contributor

@caozhong1996 caozhong1996 commented Oct 22, 2021

fix: #4829 fix: #4738

Clear buffer after 3s once is not enough. When devtools is not installed, buffer will increase via emit.

function emit(event: string, ...args: any[]) {
  if (devtools) {
    devtools.emit(event, ...args)
  } else {
    buffer.push({ event, args })
  }
}

@yyx990803 yyx990803 merged commit 6b32f0d into vuejs:master Nov 2, 2021
@caozhong1996 caozhong1996 deleted the memory branch November 9, 2021 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants