Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix event listener leaking #1180

Merged
merged 1 commit into from
Aug 6, 2023
Merged

Conversation

Palakkgoyal
Copy link
Contributor

This PR closes #1142
Fixed the memory leaking. The event listener was not remove correctly from the useEffect as they have give name of the constant instead of the function and I think window.addEventListenere doesn't return anything. So, the constant become undefined.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Palakkgoyal! for creating this pull request and contributing to Dummygram! 💗

The maintainers will review this Pull Request and provide feedback as soon as possible! 😇
We appreciate your patience and contribution, Keep up the great work! 😀

Copy link
Owner

@narayan954 narayan954 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

@narayan954
Copy link
Owner

This PR closes #1142 Fixed the memory leaking. The event listener was not remove correctly from the useEffect as they have give name of the constant instead of the function and I think window.addEventListenere doesn't return anything. So, the constant become undefined.

yup my fault ;-;

@narayan954 narayan954 merged commit 304a5ac into narayan954:master Aug 6, 2023
6 of 7 checks passed
@Palakkgoyal Palakkgoyal deleted the memoryLeak branch August 8, 2023 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak due to event listener
2 participants