Closed
Description
Version
4.0.0
Reproduction link
https://kasheftin.github.io/vuex4-memory-leak-example2/
Steps to reproduce
- Load the app and use chrome devtools memory tab;
- Take heap snapshot; The result is ~ 4.5 MB;
- Press "Add" button. It will create 100 items in the store;
- Take heap snapshot; The result is ~ 15.7 MB;
- Press "Clear regular items" button. It will remove all items in the store;
- Take heap snapshot; The result is still ~ 15.7 MB;
- Add/remove items multiple times, notice the allocated space grows all the time;
What is expected?
There's exactly the same app for vue2.6 vuex3.4: https://kasheftin.github.io/vuex4-memory-leak-example1/
Exactly the same code gives the correct result there: memory is cleared up correctly there. It should be the same in vue3.0 vuex4.0.
What is actually happening?
Allocated memory is not cleared up in vue3.0 vuex4.0
vue2.6 vuex3.4 source code (working correctly):
https://github.com/Kasheftin/vuex4-memory-leak-example1
vue3.0 vuex4.0 source code (memory leak):
https://github.com/Kasheftin/vuex4-memory-leak-example2