Skip to content

Severe Memory Leak #1083

Closed
Closed
@ngrippa

Description

@ngrippa

Describe the bug
Whenever opening/closing the DatePicker about one MB of Memory is leaked.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://vue3datepicker.com/props/modes/#range
  2. Open Devtools/Memory
  3. Create a Heap Snapshot
  4. Click on the Datepicker to open the Calendar Popup
  5. Click anywhere else in order to close a Popup
  6. Repeat 4 & 5 as often as you want to
  7. Create another Heap Snapshot
  8. The Snapshot should be larger then the previous, about 1MB per cycle.
  9. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions