You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The video listed below demonstrates the issue with Dynamic Dialog memory leak.
Video Notes:
At the start of the video, I hard refresh the page. This clears the page's memory
I go to the Dynamic Dialog Demo Page
I open and close the Dynamic Dialog multiple times
I navigate from the Dynamic Dialog 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 multiple detached Dynamic Dialog elements
bugDynamicDialogMemoryLeak.mov
Examining the source code, it appears that the memory leak is caused because the DynamicDialog component is incorrectly overriding the ngOnDestroy method.
Describe the bug
Dynamic Dialog has a memory leak.
The video listed below demonstrates the issue with Dynamic Dialog memory leak.
Video Notes:
bugDynamicDialogMemoryLeak.mov
Examining the source code, it appears that the memory leak is caused because the DynamicDialog component is incorrectly overriding the ngOnDestroy method.
Pull Request Link
#19228
Reproducer
https://primeng.org/dynamicdialog
Environment
n/a
Angular version
21+
PrimeNG version
v21
Node version
n/a
Browser(s)
all browsers
Steps to reproduce the behavior
Repeat the steps in the video above
Expected behavior
no memory leak