-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Labels
Type: BugIssue contains a bug related to a specific component. Something about the component is not workingIssue contains a bug related to a specific component. Something about the component is not working
Milestone
Description
Describe the bug
Dynamic Dialog has a memory leak.
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.
Pull Request Link
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: BugIssue contains a bug related to a specific component. Something about the component is not workingIssue contains a bug related to a specific component. Something about the component is not working
Type
Projects
Status
Done