Subscribe on changes!

[BUG Report] Memory lack might cause by Transition?

avatar
Jan 31st 2021

Version

3.0.5

Reproduction link

https://codesandbox.io/s/solitary-sound-5kr9s?file=/src/App.vue

Steps to reproduce

Normal:

  1. open chrome DevTools
  2. take heap snapshot
  3. click render button
  4. click remove button
  5. take heap snapshot
  6. compare two snapshot and set filter to div
  7. nothing different

image

With transition:

  1. click switchRender button(switch to render div with transition)
  2. take heap snapshot
  3. click render button
  4. click remove button after dom enter
  5. take heap snapshot after dom leave
  6. compare two snapshot and set filter to div
  7. four div allocated has been destory but has a detached HTMLDivElement still in memory

image

What is expected?

Is there a bug?

What is actually happening?

Maybe memory lack?

avatar
Jan 31st 2021

You should test in incognito mode in order to eliminate the interference of browser extensions. In addition, you should also click the collect garbage button every time you take a snapshot. And finally, I did some tests and found no memory leaks

avatar
Jan 31st 2021

You should test in incognito mode in order to eliminate the interference of browser extensions. In addition, you should also click the collect garbage button every time you take a snapshot. And finally, I did some tests and found no memory leaks

Sorry, thanks for your explanation, this is my mistake.