v21 Accordion Regression Memory Leak
Describe the bug
PrimeNG v21 Accordion functionality has a regression memory leak. This regression was fixed in v19 (Closed Issue #18296) and was also fixed in v20(Closed Issue #18546).
The video listed below demonstrates the issue with v21 Accordion. Video Notes:
- At the start of the video, I hard refresh the page. This clears the page's memory
- In the Video I navigate away from the Accordion Demo Page 3 times -- I navigate from the Accordion page to the "about page" because 'about page' is a very simple page
- I use the Chrome Development Tool's Memory Profiler to take a snapshot of the browsers JavaScript VM memory (profiling type = detached elements)
- Chrome has detected 3 detached Accordion elements
https://github.com/user-attachments/assets/e456967f-bae9-4bab-838f-e07892979ac9
I "arbitrarily" tested (following similar steps) a few PrimeNG Components that I use in my application:
- MegaMenu, MultiSelect, Select, SelectButton did not appear to have a memory leak
- Table appears to also have a memory leak
Pull Request Link
https://github.com/primefaces/primeng/pull/19220
Reproducer
https://primeng.org/accordion
Environment
N/A
Angular version
21+
PrimeNG version
v21
Node version
n/a
Browser(s)
all browsers
Steps to reproduce the behavior
See closed Issue #18546 "Steps" on how to reproduce the bug
Expected behavior
No memory leak.
any update on this? are they going to use your PR @rosenthalj or use another solution?
any update on this? are they going to use your PR @rosenthalj or use another solution?
@bvx5009 this bug should have been closed when issue #19250 was close
The fix is in the current version of PrimNG v21 Note: the bug was fixed with PR v21 DynamicDialog Memory Leak #19227 (which include the change in PR #19220)
I'm closing this issue