fix #19215, fixes v21 regression Accordion memory leak #19220
+22
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for issue #19215
This pull request fixes the PrimeNG BaseComponent's handling of listeners that had callbacks that were "bind(this)". I believe the bind was causing some of the v21 memory leaks.
The following video shows the Pull Request changes fixes the Memory Leak of the PrimeNG Accordion Demo.
fixV21MemoryLeak.mov
Note: I retested Table and it still has problems.I retested again and it appears that this Pull Request fixes the Table problems. The video listed below shows the Memory Leak of PrimeNG Table Demo is fixed.
fixTableMemoryLeak.mov
As an additional test, I verified that the memory leak is fixed for the PrimeNG Demo for lots of components that I use in my own application. The video listed below shows the Memory Leak of PrimeNG multiple demos without a memory leak.
fixLotsOfComponentsMemoryLeak.mov