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
A memory leak has been occurring in BaseComponent since Primeng18, and it appears to be affecting all components that inherit from BaseComponent.
This is happening because the ThemeService being called on BaseComponent's _themeChangeListener is not being released.
This can be verified in all components using BaseComponent.
It is particularly easy to confirm when using components with virtual scrolling such as Scroller, TreeTable, and Table.
If you continue to repeatedly scroll with virtual scrolling, the project's memory usage gradually increases. Details can be confirmed by taking a heap snapshot in the browser.
Expected behavior
Ensure that ThemeService is properly handled and memory is released when the component is destroyed.
The text was updated successfully, but these errors were encountered:
Describe the bug
A memory leak has been occurring in BaseComponent since Primeng18, and it appears to be affecting all components that inherit from BaseComponent.
This is happening because the ThemeService being called on BaseComponent's _themeChangeListener is not being released.
Pull Request Link
#17644
Reason for not contributing a PR
Other Reason
No response
Reproducer
https://stackblitz.com/edit/promeng-memory-leak-problem?file=src%2Fmain.ts
Environment
PrimeNG 19, Angular 19
Angular version
v19.0.6
PrimeNG version
v19
Node version
v18.20.3
Browser(s)
Chrome, Edge
Steps to reproduce the behavior
This can be verified in all components using BaseComponent.
It is particularly easy to confirm when using components with virtual scrolling such as Scroller, TreeTable, and Table.
If you continue to repeatedly scroll with virtual scrolling, the project's memory usage gradually increases. Details can be confirmed by taking a heap snapshot in the browser.
Expected behavior
Ensure that ThemeService is properly handled and memory is released when the component is destroyed.
The text was updated successfully, but these errors were encountered: