Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak when creating tables dynamically (destroy() does not clean up properly) #2048

Open
argasta opened this issue Jul 3, 2024 · 0 comments
Labels

Comments

@argasta
Copy link

argasta commented Jul 3, 2024

Describe the bug
When creating tables dynamically and destroying them with destroy() not all references are cleaned up properly which leads to memory leaks. The following objects still hold references to the grid and prevent the garbage collector to clean it up properly: recyclerComponents, observerInfoMap, instanceMap. Additionally there are also event listeners on el (mousedown, dblclick, click, mouseout, mouseover, touchstart, touchmove, touchend, contextmenu) and the document (mousedown, keydown) that are not removed and prevent the garbage collection.

To Reproduce
In the zip file toast-ui-leak.zip is a working example written with vue3:

  1. npm install
  2. npm run dev
  3. in the app click the reload button multiple times (e.g. 10-20 times)
  4. See the heap snapshot which shows that the grid gets not garbage collected properly

Expected behavior
When calling grid.destroy() there should be a proper clean up and the grid should be garbage collected

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser chrome, edge, firefox
  • Version 4.21.22
@argasta argasta added the Bug label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant