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

vue + compositionApi will cause memory leaks! #685

Closed
ygj6 opened this issue Apr 23, 2021 · 1 comment · Fixed by #686
Closed

vue + compositionApi will cause memory leaks! #685

ygj6 opened this issue Apr 23, 2021 · 1 comment · Fixed by #686

Comments

@ygj6
Copy link
Member

ygj6 commented Apr 23, 2021

Version

2.6.12

Reproduction link

https://codesandbox.io/s/billowing-butterfly-qe2yv?file=/src/App.vue

Steps to reproduce

See codesandbox for details, When the close button is clicked, the Vuecomponent memory will not be released compared to before the click.

Memory leaks

I found that when the setup() {}, of the child component is commented out, the memory can be released normally.

What is expected?

Could release memory normally.

What is actually happening?

Memory leaks!

@ygj6
Copy link
Member Author

ygj6 commented Apr 29, 2021

@pikax @antfu
The detailed reproduction steps are:

  1. Download the demo in the link and execute npm install and npm run serve;
  2. Open the local URL ;
  3. Open the developer tools, click the take heap snapshort button under the memory tab, and generate a memory snapshot A
  4. Click the close button on the page to destroy the component, and repeat step 3 to generate a memory snapshot B;

Then we will find: B does not release memory compared to A

Memory leaks

I think this is a memory leak bug, can you take a moment to look at this issue and PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant