Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory leak happening while using registerModule/unregisterModule. #1507
Steps to reproduce
What is expected?
Heap memory generated on step 3 & 5 must be cleared after step 6. (Final stage)
What is actually happening?
Heap memory of the browser is not getting cleared.
We are observing memory leak of Store._vm while using registerModule/unregisterModule extensively.
The above can be achieved by adding following code inside resetStoreVM function.
Closure function at https://github.com/vuejs/vuex/blob/dev/src/store.js#L259 is retaining environment which contains oldVm reference.
referenced a pull request that will
Feb 14, 2019
Possibly related. We are seeing a memory leak in a mutation:
This seems to help the leak.
Still working on a succinct reproducible case.