Closed
Description
Describe the bug
Whenever opening/closing the DatePicker about one MB of Memory is leaked.
To Reproduce
Steps to reproduce the behavior:
- Go to https://vue3datepicker.com/props/modes/#range
- Open Devtools/Memory
- Create a Heap Snapshot
- Click on the Datepicker to open the Calendar Popup
- Click anywhere else in order to close a Popup
- Repeat 4 & 5 as often as you want to
- Create another Heap Snapshot
- The Snapshot should be larger then the previous, about 1MB per cycle.
- You can also create Snapshots in the Middle of the Process, to see how memory consumption grows. You can also manually Garbage Collect during the process, it won't matter.
Expected behavior
The Popup should deallocate all memory when closed or, at least, only consume the memory once. Currently, additional memory is allocated every time the Popup is opened.
This leads to severe Memory Leaks in Web Applications with many DatePickers / Users clicking the DatePickers many times.
Desktop & mobile (please complete the following information):
- Browser: Chrome, Firefox
- Library version: 11.0.1
- Note: I was not able to reproduce this with the official Stackblitz. However, it worked in the official documentation and on a simple vue app, created by
npm create vue@latest
with only this package installed. I am not sure why this is not happending on Stackblitz.