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
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.
The way I did in israelrios@27a2c2a may be less error prone as you don't have to use string keys for the callbacks.
@israelrios
I took a very quick look at your proposed changes and I'm not 100% confident that your code changes fixe the memory leak. Have you verified your change by following the steps I provided in the original issue #19215? For my PR, I tried to implement a fix that minimized changes to the original code and fixed the problem. I know my solution works and have verified (before and after videos) changes. The bottom line is I'm ok with any solution that fixes the memory leak (and has also been verified to fix the memory leak). Note: Multiple times I have submitted fixes to PrimeNG bugs that PrimeNG developers like @mehmetcetin01140 and @mertsincan have updated/replaced/improved with better solutions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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