As a student diving deeper into open source this semester, I’m super excited to share my latest pull request to HSF! My PR, titled "fix: add missing ngOnDestroy cleanup in 4 UI components (event listener & timer leaks)", just got merged.
While exploring the codebase, I noticed that four Angular UI components were setting up window event listeners and setInterval timers without ever tearing them down when the components unmounted. Left unchecked, these abandoned resources cause subtle memory leaks that degrade performance over time. I added the missing ngOnDestroy lifecycle hooks to ensure all subscriptions, timers, and listeners are properly cleaned up.
The review process was surprisingly friendly and encouraging. One of the maintainers, Alex, left a helpful comment: "Great catch! Could we also clear the window resize listener in Component B while we're here?" I pushed a quick update to handle that edge case, and Alex approved it with a "LGTM! Thanks for keeping our UI snappy!"
This contribution taught me a ton about Angular lifecycle management and the real-world importance of memory hygiene in frontend applications. It’s easy to focus only on building shiny new features, but hunting down performance bottlenecks is just as rewarding. I'm definitely feeling more confident to tackle bigger HSF issues next!