We are considering using it in our project. However, during the process, we encountered a memory leak issue, and we would like to report it.
Overview
In Vue 2, there is a memory leak issue where components are not completely cleared and remain in the internal state even after being cleared.
Details
Even after adding Vue 2 components using addNode, when you call clear, the Vue instances remain, leading to a memory leak issue.
Steps to reproduce
Set up Drawflow.
Add a large number of Vue components using addNode.
Call the clear method.
Open the developer tools and enter window.__VUE_HOT_MAP__ in the console. You will notice that Vue instances, which should have been cleared, are still present.
Thank you for providing this wonderful library.
We are considering using it in our project. However, during the process, we encountered a memory leak issue, and we would like to report it.
Overview
In Vue 2, there is a memory leak issue where components are not completely cleared and remain in the internal state even after being cleared.
Details
Even after adding Vue 2 components using addNode, when you call clear, the Vue instances remain, leading to a memory leak issue.
Steps to reproduce
window.__VUE_HOT_MAP__
in the console. You will notice that Vue instances, which should have been cleared, are still present.Here is my POC repository.
When running Memlab, a tool used to check for memory leaks, the following results are obtained.
Expected behavior
When performing a clear operation, it is recommended to call
$destroy
on the Vue instance and remove the instance completely.Environment
Additional information
While we haven't tested it, Vue 3 might also be affected by this issue.