Skip to content

Conversation

@rosenthalj
Copy link
Contributor

@rosenthalj rosenthalj commented Dec 16, 2025

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

@vercel
Copy link

vercel bot commented Dec 16, 2025

@rosenthalj is attempting to deploy a commit to the cetincakiroglu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@israelrios
Copy link

The way I did in israelrios@27a2c2a may be less error prone as you don't have to use string keys for the callbacks.

@rosenthalj
Copy link
Contributor Author

rosenthalj commented Dec 22, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants